IBM AS/400 User Manual

Page of 489
 
 
Using a Compiler Listing
 
Using a Compiler Listing
This section discusses how to obtain a listing and how to use it to help you:
¹
Fix compilation errors
¹
Fix run-time errors
¹
Provide documentation for maintenance purposes.
See Appendix D, “Compiler Listings” on page 423 for more information on the dif-
ferent parts of the listing and for a complete sample listing.
Obtaining a Compiler Listing
To obtain a compiler listing specify OUTPUT(*PRINT) on either the CRTBNDRPG
command or the CRTRPGMOD command. (This is their default setting.) The spec-
ification OUTPUT(*NONE) will suppress a listing.
Specifying OUTPUT(*PRINT) results in a compiler listing which consists
 minimally
of the following sections:
¹
Prologue (command option summary)
¹
Source Listing, which includes:
– In-Line diagnostic messages
– Match-field table (if using the RPG cycle with match fields)
¹
Additional diagnostic messages
¹
Field Positions in Output Buffer
¹
/COPY Member Table
¹
Compile Time Data which includes:
– Alternate Collating Sequence records and table or NLSS information and
table
– File translation records
  – Array records
  – Table records
 
¹
Message summary
 
¹
Final summary
¹
Code generation report (appears only if there are errors)
¹
Binding report (applies only to CRTBNDRPG; appears only if there are errors)
The following additional information is included in a compiler listing if the appro-
priate value is specified on the OPTION parameter of either create command:
*EXPDDS
Specifications of externally-described files (appear in source section of
listing)
*SHOWCPY
Source records of /COPY members (appear in source section of listing)
   
Chapter 6. Creating a Program with the CRTBNDRPG Command
63