How can I quickly tell if my COBOL program is optimized? How can I tell if the IBM optimize option is in effect for my load module?

Document ID : KB000024827
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction:

When debugging an optimized program you can encounter unpredictable results when setting breakpoints and monitoring your program.
If the programs compile listing output is not available you can use the CA InterTest for CICS online LIST transaction to display the program source code to see what COBOL compile options are in effect for the program.

Instructions:

In this example sign on to CICS and at a clear screen enter LIST=BILLASK and press ENTER.
The source code for program BILLASK will be displayed on the screen starting at the identification division.

CA-InterTest for CICS r8   - PROTUSR FILE  SOURCE LISTING DISPLAY
COMMAND ===>
Program= BILLASK  Option #       Stmt #                             Margin= 01
                                        Search=
OPTS 1 Proc div  2 Work-stor 3 Link sect  4 D-map      5 Clst/Pmap More:   +
     6 Data xref 7 Proc xref 8 Err msgs   9 Srch fwd  10 Srch bwd
PFKS 1 Help      2 SDF       3 End        4 Profile    5 Monitor    6 Menu
     7 Backward  8 Forward   9           10           11           12 Status
-------------------------------------------------------------------------------
Messages    Total    Informational    Warning    Error    Severe    Terminating
Printed:       1                          1
   000001 ID DIVISION.
   000002 PROGRAM-ID. BILLASK.
   000003 ENVIRONMENT DIVISION.
   000004 DATA DIVISION.
 _ 000005 WORKING-STORAGE SECTION.  

Next press PF7 to page backwards and you will see all the compile options in effect for this program. In this example the program was optimized with the IBM OPT parameter which is indicated by option OPTIMIZE(STD) in the print screen below.

CA-InterTest for CICS r8   - PROTUSR FILE  SOURCE LISTING DISPLAY
COMMAND ===>
Program= BILLASK  Option #       Stmt #                             Margin= 01
                                        Search=
OPTS 1 Proc div  2 Work-stor 3 Link sect  4 D-map      5 Clst/Pmap More:   +
     6 Data xref 7 Proc xref 8 Err msgs   9 Srch fwd  10 Srch bwd
PFKS 1 Help      2 SDF       3 End        4 Profile    5 Monitor    6 Menu
     7 Backward  8 Forward   9           10           11           12 Status
-------------------------------------------------------------------------------
      OPTIMIZE(STD)
      OUTDD(SYSOUT)
      PGMNAME(COMPAT)
      RENT
      RMODE(AUTO)

Additional Information:

Please review the release 9.1 CA Application Quality and Testing Tools Symbolic Guide for more information on optimization.