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 theData Division Map
and in theInitial Heap Storage Map
. - A description of the
storage
is found in theInitial Heap Storage Map
. The symbols inWORKING-STORAGE
area of the source are mapped into thestorage
that is shown in theInitial Heap Storage Map
.You can use the
Data Division Map
along with theInitial Heap Storage Map
section to find the location of data items defined inWORKING-STORAGE
. These data items reside in thestorage
. TheInitial Heap Storage Map
gives the offset of each level-1 data item relative to the beginning of thestorage
. TheData 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 thestorage
.If you compile with the
DATA24
option, data items mapped below the line will appear in theBelow the Line Storage
. 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.
Example: MD5 signature
Example: Timestamp and version information
Example: Compiler options and program information
Example: Assembler code generated from source code
Example: Program prolog areas
Example: initial heap storage map
Example: Constant area
Example: Base locator table
Example: External symbols
Example: DSA memory map (stack storage map)
Signature information bytes
Example: MAP output
Language Environment® Programming Guide (Stack storage overview)