CL module compiler listings
When you create a CL module, you can create various types of listings using the OPTION and OUTPUT parameters on the Create Control Language Module (CRTCLMOD) command.
The OPTION parameter values and their meanings are:
- *GEN or *NOGEN
Whether a module is to be created (*GEN is the default).
- *XREF or *NOXREF
Whether a listing of cross-references to variables and data references in the source input is to be produced (*XREF is the default).
The OUTPUT parameter values and their meanings are:
- *PRINT - print listing
- *NONE - no compiler listing
The listing created by specifying the OUTPUT parameter is called a compiler listing. The following example is about compiler listing. The callout numbers refer to descriptions following the listing.
1 2 3
5722SS1 V5R3M0 041231 Control Language MYLIB/DUMPER SYSNAME 05/06/00 11:12:55 Page 1
Module . . . . . . . . . . . . . . . . . . . . : DUMPERR
Library . . . . . . . . . . . . . . . . . . : MYLIB
Source file . . . . . . . . . . . . . . . . . : QCLSRC
Library . . . . . . . . . . . . . . . . . . : MYLIB
Source member name . . . . . . . . . . . . . : DUMPERR 05/06/94 10:42:26 4
Source printing options . . . . . . . . . . . : *XREF *NOSECLVL *NOEVENTF
Module logging . . . . . . . . . . . . . . . : *JOB
Replace module object . . . . . . . . . . . . : *YES
Target release . . . . . . . . . . . . . . . : V5R3M0
Authority . . . . . . . . . . . . . . . . . . : *LIBCRTAUT
Sort sequence . . . . . . . . . . . . . . . . : *HEX
Language identifier . . . . . . . . . . . . . : *JOBRUN
Text . . . . . . . . . . . . . . . . . . . . : Test program
Optimization . . . . . . . . . . . . . . . . : *NONE
Debugging view . . . . . . . . . . . . . . . : *STMT
Enable performance collection . . . . . . . . : *PEP
Compiler . . . . . . . . . . . . . . . . . . : IBM i5/OS Control Language Compiler 5
6 Control Language Source
SEQNBR *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+. DATE 8
100- PGM 05/06/94
200- DCL &ABC *CHAR 10 VALUE('THIS') 05/06/94
300- DCL &XYZ *CHAR 10 VALUE('THAT') 7 05/06/94
400- DCL &MNO *CHAR 10 VALUE('OTHER') 05/06/94
500- CRTLIB LB(LARRY) 05/06/94
* CPD0043 30 Keyword LB not valid for this command. 9
600- DLTLIB LIB(MOE 05/06/94
* CPD0013 30 A matching parenthesis not found.
700- MONMSG CPF0000 EXEC(GOTO ERR) 05/06/94
800- ERROR: 05/06/94
900- CHGVAR &ABC 'ONE' 05/06/94
1000- CHGVAR &XYZ 'TWO' 05/06/94
1100- CHGVAR &MNO 'THREE' 05/06/94
1200- DMPCLPGM 05/06/94
1300- ENDPGM 05/06/94
* * * * * E N D O F S O U R C E * * * * *
5722SS1 V5R3M0 040201 Control Language MYLIB/DUMPER SYSNAME 05/06/00 11:12:55 Page 2
Cross Reference
Declared Variables
Name Defined Type Length References
&ABC 200 *CHAR 10 900
&MNO 400 *CHAR 10 1100
10
&XYZ 300 *CHAR 10 1000
Defined Labels
Label Defined References 11
ERR ****** 700
* CPD0715 30 Label 'ERR ' does not exist.
ERROR 800
* * * * * E N D O F C R O S S R E F E R E N C E * * * * *
5722SS1 V5R3M0 040201 Control Language MYLIB/DUMPER SYSNAME 05/06/04 11:12:55 Page 3
Message Summary
Severity
Total 0-9 10-19 20-29 30-39 40-49 50-59 60-69 70-79 80-89 90-99 12
3 0 0 0 3 0 0 0 0 0 0
Module DUMPERR not created in library MYLIB. Maximum error severity 30. 13
* * * * * E N D O F M E S S A G E S U M M A R Y * * * * *
* * * * * E N D O F C O M P I L A T I O N * * * * *
- 1
- The program number, release, modification level and date of the IBM® i operating system.
- 2
- The date and time of the compiler run.
- 3
- The page number in the listing.
- 4
- The parameter values specified (or defaults if not specified) on the Create Control Language Module (CRTCLMOD) command. If the source is not in a database file, the member name, date, and time are omitted.
- 5
- The name of the compiler.
- 6
- The sequence numbers of lines (records) in the source. A dash following a sequence number indicates that a source statement begins at that sequence number. The absence of a dash indicates that a statement is the continuation of the previous statement.
- Comments between source statements are handled like any other source statement and have sequence numbers.
- 7
- The source statements.
- 8
- The last date the source statement was changed or added. If the source is not in a database file, or the dates have been reset using RGZPFM, the date is omitted.
- 9
- If an error is found during compilation and can be traced to a specific source statement, the error message is printed immediately following the source statement. An asterisk (*) indicates the line contains an error message. The line contains the message identifier, severity, and the text of the message.
- 10
- The symbolic variable table is a cross-reference listing of the variables validly declared in the program. The table lists the variable, the sequence number of the statement where the variable is declared, the variable's attributes, and the sequence numbers of statements that refer to the variable.
- 11
- The label table is a cross-reference listing of the labels validly defined in the program. The table lists the label, the sequence number of the statement where the label is defined, and the sequence numbers of statements that refer to the label.
Messages:
This section is not included in the sample listing because no general error messages were issued for the sample module. If there were general error messages for this module, this section would contain, for each message, the message identifier, the severity, and the message.
Message Summary:
- 12
- A summary of the number of messages issued during compilation. The total number is given along with totals by severity.
- 13
- A completion message is printed following the message summary.
The title, prologue, source, and message summary sections are always printed for the *SOURCE option. The cross-reference section is printed if the *XREF option is specified. The message section is printed only if general errors are found.