Skip to main content
Question

Rocket Analyzer - Conditional %INCLUDE Detection Issue

  • June 9, 2026
  • 2 replies
  • 32 views

gspurohit

Summary: Rocket Analyzer is not detecting %INCLUDE statements that are wrapped in conditional compilation directives (%IF).

Problem Description: We have a PL/I program `PL1PGM1.pl1` that includes a copybook `PL1INCL1.inc` which contains multiple %INCLUDE statements. Some of these includes are wrapped in conditional compilation directives using %IF statements. Rocket Analyzer's dependency analysis only detects %INCLUDE statements where the conditional compilation evaluates to TRUE based on preprocessor variable values. It excludes includes where conditions evaluate to FALSE.

 

Example from PL1INCL1.inc

%IF $COND1 = 'YES' %THEN %DO;

%INCLUDE PL1INCL2;

%END;

 

%IF $COND2 = 'YES' %THEN %DO;

%INCLUDE PL1INCL3;

%END;

 

%IF $COND3 = 'YES' %THEN %DO;

%INCLUDE PL1INCL4;

%END;

 

Since `COND1` and `COND2` are not set to 'YES', Rocket Analyzer excludes PL1INCL2 and PL1INCL3 from the dependency graph.

 

To check, I changed the condition %IF $COND1= 'YES' %THEN %DO; to %IF $COND1= 'NO' %THEN %DO; and the dependency now included the copybook PL1INCL2.

 

Is it a expected behaviour of the Rocket analyzer? Due to this issue, the inventory and the dependency is incomplete. Please help advise.

2 replies

  • Rocketeer
  • June 9, 2026

This is the expected behavior of EA as we assume a specific version of the code is compiled and analyze that.

A user may choose to create different versions of the code with different options for the Pre compiler.

In PL/I , when macros are being used, you may end up with two completely different programs depending on the way the variables are set prior to compile.


gspurohit
  • Author
  • New Participant
  • June 9, 2026

This is the expected behavior of EA as we assume a specific version of the code is compiled and analyze that.

A user may choose to create different versions of the code with different options for the Pre compiler.

In PL/I , when macros are being used, you may end up with two completely different programs depending on the way the variables are set prior to compile.


Thanks ​@Zvika Avivi for the response. I am wondering if during the compilation of the program in ED, it will create any issue and we will need to include the copybooks manually as inventory is not listing them?