Displaying source code

To display the source code for an entire program, place the cursor on any yellow point-and-shoot source line number or listing statement number and press Enter. For example, if line number 69 was selected from an event in the interactive report, the display that is shown in Sample Compiler Listing display might be displayed.
Figure 1. Sample Compiler Listing display
  File  View  Services  Help
───────────────────────────────────────────────────────────────────────────────
Program CICFRED Compiler Listing                              Line 63 Col 1 80
Command ===> ________________________________________________ Scroll ===> CSR 
TRANID: FRED      CICS ABEND: AEIL                CICS04   2019/01/09 15:37:46
000060             Move length of MSG1 to dfhb0020
000061             Call 'DFHEI1' using by content x'04043000070000008100004000
000062        -    '00f0f0f0f1f8404040' by content x'0000' by content x'0000'
000063              reference MSG1 by reference dfhb0020 end-call.
000065             ADD 1 TO COUNTER.
000066        *EXEC CICS READ FILE('NOTTHERE') RIDFLD(RID)
000067        *     INTO(REC-AREA) END-EXEC.
000068             Move length of REC-AREA to dfhb0020
000069             Call 'DFHEI1' using by content x'0602f0000700008000f0f0f0f2
000070        -    '404040' by content 'NOTTHERE' by reference REC-AREA by
000071             reference dfhb0020 by reference RID end-call.
000073        *EXEC CICS SEND FROM(MSG1) END-EXEC.
000074             Move length of MSG1 to dfhb0020
000075             Call 'DFHEI1' using by content x'04043000070000000100004000
000076        -    '00f0f0f0f2f2404040' by content x'0000' by content x'0000'
000077              reference MSG1 by reference dfhb0020 end-call.
000079        *EXEC CICS RETURN END-EXEC.
 F1=Help      F3=Exit      F5=RptFind   F6=AddBkp    F7=Up        F8=Down
F10=Left     F11=Right

The source line or statement number that is initially selected is highlighted.

The example that is shown here assumes that the display of pseudo-assembler instructions is suppressed. For details on this suppression, see Displaying source code.

Information that is displayed in blue (all lines that start in column 1) pertains to the program source code. On the left side of the display is information about the source line or listing statement number of the source displayed. This information is followed by the actual source code at this location in the program.

To add machine instruction information to the listing, select the View menu Add Pseudo Assembler Instructions option (for information about selecting this option in general, refer to Action-bar pull-down menus). This option causes the Compiler Listing display to be reformatted with pseudo-assembler instructions inserted into the program source code as shown in Sample Compiler Listing display: Pseudo-assembler instructions enabled .
Figure 2. Sample Compiler Listing display: Pseudo-assembler instructions enabled
  File  View  Services  Help
───────────────────────────────────────────────────────────────────────────────
Program CICFRED Compiler Listing                             Line 316 Col 1 80
Command ===> ________________________________________________ Scroll ===> CSR 
TRANID: FRED      CICS ABEND: AEIL                CICS04   2019/01/09 15:37:46
              000003DA 1845           LR    R4,R5
              000003DC 8E40 0020      SRDA  R4,32
              000003E0 5D40 C000      D     R4,0(,R12)
              000003E4 4040 8008      STH   R4,8(,R8)
000066        *EXEC CICS READ FILE('NOTTHERE') RIDFLD(RID)
000067        *     INTO(REC-AREA) END-EXEC.
000068             Move length of REC-AREA to dfhb0020
              000003E8 D201 8088 A01C MVC   136(2,R8),28(R10)
000069             Call 'DFHEI1' using by content x'0602f0000700008000f0f0f0f2
000070        -    '404040' by content 'NOTTHERE' by reference REC-AREA by
000071             reference dfhb0020 by reference RID end-call.
              000003EE D210 D0B8 A061 MVC   184(17,R13),97(R10)
              000003F4 4130 D0B8      LA    R3,184(,R13)
              000003F8 5030 D0A0      ST    R3,160(,R13)
              000003FC D207 D0D0 A08E MVC   208(8,R13),142(R10)
              00000402 4130 D0D0      LA    R3,208(,R13)
              00000406 5030 D0A4      ST    R3,164(,R13)
 F1=Help      F3=Exit      F5=RptFind   F6=AddBkp    F7=Up        F8=Down
F10=Left     F11=Right

Information that is displayed in green (all lines that start in column 15) pertains to the disassembly of machine instructions. This information is shown interspersed with the source code information, following the line of code to which they belong.

Note: For COBOL programs compiled with TEST(NONE,SYM,SEPARATE), all pseudo-assembler instructions are placed following the last line of source code.

For all other programs, ensure that the source line of interest is scrolled to the top of the display before you add pseudo-assembler instructions to the listing display. The extra display lines might cause the source line to disappear from the current view.

To remove the pseudo-assembler instructions from the display, select the View menu Remove Pseudo Assembler Instructions option.

Information at the top of the listing indicates the source of the compiler listing or side. An example is shown in Sample Compiler Listing display: Origin information. You can scroll to the top of the side file listing by entering, for example, the UP MAX command.
Figure 3. Sample Compiler Listing display: Origin information
  File  View  Services  Help
───────────────────────────────────────────────────────────────────────────────
Program CICFRED Compiler Listing                               Line 1 Col 1 80
Command ===> ________________________________________________ Scroll ===> CSR 
TRANID: FRED      CICS ABEND: AEIL                CICS04   2019/01/09 15:37:46

The listing or side file used for the following was found in
DA.LISTING.COBOL(CICFRED).

Source
Line #
000001        ******************************************************
000002        * TRANSACTION: FRED                                  *
000003        *   EXPECTED OUTPUT:                                 *
000004        *     'STARTED CICFRED' FOLLOWED BY AEIL ABEND       *
000005        ******************************************************
000006         IDENTIFICATION DIVISION.
000007         PROGRAM-ID. CICFRED.
000008         ENVIRONMENT DIVISION.
000009         DATA DIVISION.
000010         WORKING-STORAGE SECTION.
000011         77  UPPER-LIMIT  PIC S9(4) COMP VALUE 255.
 F1=Help      F3=Exit      F5=RptFind   F6=AddBkp    F7=Up        F8=Down
F10=Left     F11=Right