Appendix D. Compiler Listings

Compiler listings provide you with information regarding the correctness of your code with respect to the syntax and semantics of the RPG IV language. The listings are designed to help you to correct any errors through a source editor; as well as assist you while you are debugging a module. This section tells you how to interpret an ILE RPG compiler listing. See Using a Compiler Listing for information on how to use a listing.

To obtain a compiler listing specify OUTPUT(*PRINT) on either the CRTRPGMOD command or the CRTBNDRPG command. (This is their default setting.) The specification OUTPUT(*NONE) will suppress a listing.

Table 1 summarizes the keyword specifications and their associated compiler listing information.

Table 1. Sections of the Compiler Listing
Listing Section1 OPTION2 Description
Prologue   Command option summary
Source listing   Source specifications
  In-line diagnostic messages   Errors contained within one line of source
  /COPY members *SHOWCPY /COPY member source records
  Skipped statements *SHOWSKP Source lines excluded by conditional compilation directives.
  Externally described files *EXPDDS Generated specifications
  Matching field table   Lengths that are matched based on matching fields
Additional diagnostic messages   Errors spanning more than one line of source
Field Positions in Output Buffer   Start and end positions of programmed-described output fields
/COPY member table   List of /COPY members and their external names
Compile-time data   Compilation source records
  Alternate collating sequences   ALTSEQ records and table or NLSS information and table
  File translation   File translation records
  Arrays   Array records
  Tables   Table records
Key field information *EXPDDS Key field attributes
Cross reference *XREF File and record, and field and indicator references
EVAL-CORR Summary *XREF4 Summary of subfields for EVAL-CORR operations
External references *EXT List of external procedures and fields referenced during compilation
Message summary   List of messages and number of times they occurred
  Second-level text *SECLVL Second-level text of messages
Final summary   Message and source record totals, and final compilation message
Code generation errors3   Errors (if any) which occur during code generation phase.
Binding section3   Errors (if any) which occur during binding phase for CRTBNDRPG command
Note:
  1. The information contained in the listing section is dependent on whether *SRCSTMT or *NOSRCSTMT is specified for the OPTION parameter. For details on how this information changes, see "*NOSRCSTMT Source Heading" and "*SRCSTMT Source Heading". *SRCSTMT allows you to request that the compiler use SEU sequence numbers and source IDs when generating statement numbers for debugging. Otherwise, statement numbers are associated with the Line Numbers of the listing and the numbers are assigned sequentially.
  2. The OPTION column indicates what value to specify on the OPTION parameter to obtain this information. A blank entry means that the information will always appear if OUTPUT(*PRINT) is specified.
  3. The sections containing the code generation errors and binding errors appear only if there are errors. There is no option to suppress these sections.
  4. If OPTION(*XREF) is specified, the summary lists information about all subfields, whether or not they are handled by the EVAL-CORR operation. If OPTION(*NOXREF) is specified, the summary lists only information about subfields that are not handled by the EVAL-CORR operation. The EVAL-CORR summary section is not printed if there are no EVAL-CORR operations.

Feedback