Reading LIST output

Parts of the LIST compiler output might be useful to you for debugging a program.

The LIST compiler option produces several pieces of output:

  • An assembler listing of the initialization code for the program (program signature information bytes) from which you can verify program characteristics such as:
    • Compiler options in effect
    • Types of data items present
    • Statements used in the PROCEDURE DIVISION
  • An assembler listing of the source code for the program

    From the address in storage of the instruction that was executing when an abend occurred, you can find the COBOL statement that corresponds to that instruction. After you find the address of the failing instruction, go to the assembler listing and find the statement for which that instruction was generated. The line number is in the 3rd column of the assembler listing for your program. Using the line number, you can locate the STATEMENT by looking at the corresponding line in the Source Output section of the listing.

  • Information about WORKING-STORAGE. This information is contained in the Data Division Map and in the Start of changeInitial Heap Storage MapEnd of change.
  • A description of the Start of changestorageEnd of change is found in the Start of changeInitial Heap Storage MapEnd of change. The symbols in WORKING-STORAGE area of the source are mapped into the Start of changestorageEnd of change that is shown in the Start of changeInitial Heap Storage MapEnd of change.

    You can use the Data Division Map along with the Start of changeInitial Heap Storage MapEnd of change section to find the location of data items defined in WORKING-STORAGE. These data items reside in the Start of changestorageEnd of change . The Start of changeInitial Heap Storage MapEnd of change gives the offset of each level-1 data item relative to the beginning of the storage. The Data Division Map section gives the offset of the level-n data items relative to their respective level-1 member. By using both pieces of information, you can determine the offset of any data member within the Start of changestorageEnd of change.

    If you compile with the DATA24 option, data items mapped below the line will appear in the Start of changeBelow the Line StorageEnd of change. You can follow the same process to determine their locations.

  • Information about the constants and the literals used in the program. The Constant Area contains information about the constants and literals in the program, as well as those created by the compiler. This section contains the offset of each constant or literal within the Constant Area.
  • Program prolog areas (PPA1, PPA2, PPA3, PPA4) contain information about the characteristics of the compiled program.
  • Externals symbols dictionary contains the list of external symbols defined by or referred to, in your program.
  • Map of the dynamic save area (DSA)

    The map of the DSA (also known as the stack frame) contains information about the contents of the storage acquired each time a separately compiled procedure is entered.

You do not need to be able to program in assembler language to understand the LIST output. The comments that accompany most of the assembler code provide you with a conceptual understanding of the functions performed by the code.

Related references
Signature information bytes  
Example: MAP output
Language Environment® Programming Guide (Stack storage overview)