A compiler listing of an error-free program can be used as documentation
when:
Teaching the program to a new programmer.
Updating the program at a later date.
In either case it is advisable to have a full listing, namely, one produced
with OUTPUT(*PRINT) and with OPTION(*XREF *SHOWCPY *EXPDDS *EXT *SHOWSKP).
Note:
Except for *SHOWSKP,
this is the default setting for each of these parameters on both create commands.
Of particular value for program maintenance is the Prologue section of
the listing. This section tells you:
Who compiled the module/program
What source was used to produce the module/program
What options were used when compiling the module/program
You may need to know about the command options (for example, the debug
view selected, or the binding directory used) when you make later changes
to the program.
The following specifications for the OPTION parameter provide additional
information as indicated:
*SHOWCPY and *EXPDDS provide a complete description of the program, including
all specifications from /COPY members, and generated specifications from
externally described files.
*SHOWSKP allows you to see the statements that are ignored by the compiler
as a result of /IF, /ELSEIF, /ELSE, OR /EOF directives.
*XREF allows you to check the use of files, fields, and indicators within
the module/program.
*EXT allows you to see which procedures and fields are imported or exported
by the module/program. It also identifies the actual files which were used
for generating the descriptions for externally described files and data structures.