Get the information that you need for debugging by requesting the appropriate compiler listing with the use of compiler options.
Attention: The listings produced by the compiler are not a programming interface and are subject to change.
| Use | Listing | Contents | Compiler option |
|---|---|---|---|
| To check a list of the options in effect for the program, statistics about the content of the program, and diagnostic messages about the compilation | Short listing |
|
NOSOURCE, NOXREF, NOVBREF, NOMAP, NOOFFSET,NOLIST |
| To aid in testing and debugging your program; to have a record after the program has been debugged | Source listing | Copy of your source | SOURCE |
| To find certain data items in a storage dump; to see the final storage allocation after reentrancy or optimization has been accounted for; to see where programs are defined and check their attributes | Map of DATA DIVISION items | All DATA DIVISION items and all implicitly declared items
Embedded map summary (in the right margin of the listing for lines in the DATA DIVISION that contain data declarations) Nested program map (if the program contains nested programs) |
MAP2 |
| To find where a name is defined, referenced, or modified; to determine the context (such as whether a verb was used in a PERFORM block) in which a procedure is referenced; to determine the data set or file from which a copybook was obtained | Sorted cross-reference listing of names; sorted cross-reference listing of COPY/BASIS statements and copybook data sets or files | Data-names,
procedure-names, and program-names;
references to these names
COPY/BASIS text-names and library names, and the data sets or files from which associated copybooks were obtained Embedded modified cross-reference provides line numbers where data-names and procedure-names were defined |
XREF2,3 |
| To find the failing verb in a program or the address in storage of a data item that was moved during the program | PROCEDURE DIVISION code and assembler code produced by the compiler3 | Generated code | LIST2,4 |
| To verify you still have a valid logic path after you move or add PROCEDURE DIVISION sections | Condensed PROCEDURE DIVISION listing | Condensed verb listing, global tables, WORKING-STORAGE information, and literals | OFFSET |
| To find an instance of a certain verb | Alphabetic listing of verbs | Each verb used, number of times each verb was used, line numbers where each verb was used | VBREF |
|
|||
Example: short listing
Example: SOURCE and NUMBER output
Example: MAP output
Example: embedded map summary
Example: nested program map
Example: XREF output: data-name cross-references
Example: XREF output: program-name cross-references
Example: XREF output: COPY/BASIS cross-references
Example: embedded cross-reference
Example: OFFSET compiler output
Example: VBREF compiler output
related tasks
Generating a list of compiler error messages
Reading LIST output
Language Environment Debugging Guide (Debugging COBOL programs)
related references
Messages and listings for compiler-detected errors