Example: short listing

The parenthetical numbers shown in the listing below correspond to numbered explanations that follow the listing. For illustrative purposes, some errors that cause diagnostic messages were deliberately introduced.

PROCESS(CBL) statements:   (1)
 CBL    NOSOURCE,NOXREF,NOVBREF,NOMAP,NOLIST    (2)        
Options in effect:    (3)
 NOADATA
   ADDR(32)
   QUOTE
   ARCH(POWERPC)  
   ARITH(COMPAT)
   CALLINT(NODESCRIPTOR) 
   CHAR(NATIVE)
 NOCICS
   COLLSEQ(BINARY)
 NOCOMPILE(S)
 NOCURRENCY
 NODATEPROC
 NODIAGTRUNC
 NODYNAM
 NOEXIT
   FLAG(I,I)
 NOFLAGSTD
   FLOAT(NATIVE)
   LIB            
   LINECOUNT(60)
 NOLIST
   LSTFILE(LOCALE)
 NOMAP
   MAXMEM(2048K)         
 NOMDECK
   NCOLLSEQ(BINARY)
   NSYMBOL(NATIONAL)
 NONUMBER
 NOOPTIMIZE
   PGMNAME(LONGUPPER)   
 NOPROFILE               
   SEPOBJ
   SEQUENCE
   SIZE(8388608)
 NOSOSI
 NOSOURCE               
   SPACE(1)
   SPILL(512)
 NOSQL     
   SRCFORMAT(COMPAT)            
 NOSSRANGE
   TERM
 NOTEST
 NOTHREAD
   TRUNC(STD)           
 NOVBREF
 NOWSCLEAR
 NOXREF                 
   YEARWINDOW(1900)
   ZWB
LineID  Message code  Message text    (4)
        IGYDS0139-W   Diagnostic messages were issued during processing of compiler options.  These messages are
                    located at the beginning of the listing.
   193  IGYDS1050-E   File "LOCATION-FILE" contained no data record descriptions.  The file definition was discarded.
   889  IGYPS2052-S   An error was found in the definition of file "LOCATION-FILE".  The reference to this file
                    was discarded.
                      Same message on line:    983
   993  IGYPS2121-S   "WS-DATE" was not defined as a data-name.  The statement was discarded.
                      Same message on line:    994
   995  IGYPS2121-S   "WS-TIME" was not defined as a data-name.  The statement was discarded.
                      Same message on line:    996
   997  IGYPS2053-S   An error was found in the definition of file "LOCATION-FILE".  This input/output statement
                    was discarded.
                      Same message on line:   1009
  1008  IGYPS2121-S   "LOC-CODE" was not defined as a data-name.  The statement was discarded.
  1219  IGYPS2121-S   "COMMUTER-SHIFT" was not defined as a data-name.  The statement was discarded.
                      Same message on line:   1240
  1220  IGYPS2121-S   "COMMUTER-HOME-CODE" was not defined as a data-name.  The statement was discarded.
                      Same message on line:   1241
  1222  IGYPS2121-S   "COMMUTER-NAME" was not defined as a data-name.  The statement was discarded.
                      Same message on line:   1243
  1223  IGYPS2121-S   "COMMUTER-INITIALS" was not defined as a data-name.  The statement was discarded.
                      Same message on line:   1244
  1233  IGYPS2121-S   "WS-NUMERIC-DATE" was not defined as a data-name.  The statement was discarded.
Messages    Total    Informational    Warning    Error   Severe   Terminating    (5)
Printed:      21                          2         1       18
  * Statistics for COBOL program SLISTING:    (6)
* Source records = 1765
* Data Division statements = 277
* Procedure Division statements = 513
Locale = en_US.ISO8859-1                     (7)
End of compilation 1,  program SLISTING,  highest severity: Severe.   (8)
Return code 12
(1)
Message about options specified in a PROCESS (or CBL) statement. This message does not appear if no options were specified.
(2)
Options coded in the PROCESS (or CBL) statement.
(3)
Status of options at the start of this compilation.
(4)
Program diagnostics. The first message refers you to the library phase diagnostics, if there were any. Diagnostics for the library phase are always presented at the beginning of the listing.
(5)
Count of diagnostic messages in this program, grouped by severity level.
(6)
Program statistics for the program SLISTING.
(7)
The locale that the compiler used.
(8)
Program statistics for the compilation unit. When you perform a batch compilation (multiple outermost COBOL programs in a single compilation), the return code is the highest message severity level for the entire compilation.