ILE COBOL Programmer's Guide

A Sample Program and Listing

The following sample listings illustrate the compiler options and source listing produced for the program example. References to the figures are made throughout the following text. These references are indexed by the reverse printing of letters on a black background, for example ((Z)). The reverse letters in the text correspond to the letters found in the figures.

Command Summary

This summary, produced as a result of compilation, lists all options specified in the CRTCBLMOD or CRTBNDCBL command. Refer to Using the Create COBOL Module (CRTCBLMOD) Command for more information about user-defined options.

Figure 10. CRTCBLMOD Command Summary Listing


 5722WDS V5R3M0  030905 LN  IBM ILE COBOL         CBLGUIDE/EXTLFL     ISERIES1   03/09/15 13:11:39      Page    1
Command  . . . . . . . . . . . . . . . :   CRTCBLMOD
Actual Values:
  Module . . . . . . . . . . . . . . . :   EXTLFL
    Library  . . . . . . . . . . . . . :     CBLGUIDE
  Source file  . . . . . . . . . . . . :   QCBLLESRC
    Library  . . . . . . . . . . . . . :     CBLGUIDE
    CCSID  . . . . . . . . . . . . . . :   37
  Source member  . . . . . . . . . . . :   EXTLFL         02/03/05 10:50:50
  Text 'description' . . . . . . . . . :   *BLANK
Command Options:
  Module . . . . . . . . . . . . . . . :   EXTLFL
    Library  . . . . . . . . . . . . . :     CBLGUIDE
  Source file  . . . . . . . . . . . . :   QCBLLESRC
    Library  . . . . . . . . . . . . . :     CBLGUIDE
  Source member  . . . . . . . . . . . :   EXTLFL
  Output . . . . . . . . . . . . . . . :   *PRINT
  Generation severity level  . . . . . :   30
  Text 'description' . . . . . . . . . :   *SRCMBRTXT
  Compiler options . . . . . . . . . . :   *NONE
  Conversion options . . . . . . . . . :   *NONE
  Message limit:
    Number of messages . . . . . . . . :   *NOMAX
    Message limit severity . . . . . . :   30
  Debug view . . . . . . . . . . . . . :   *STMT
  Optimize level . . . . . . . . . . . :   *NONE
  FIPS flagging  . . . . . . . . . . . :   *NOFIPS *NOOBSOLETE
  Extended display options . . . . . . :   *NONE
  Flagging severity  . . . . . . . . . :   0
  Replace module . . . . . . . . . . . :   *NO
  Authority  . . . . . . . . . . . . . :   *LIBCRTAUT
  Link literal . . . . . . . . . . . . :   *PGM
  Target release . . . . . . . . . . . :   *CURRENT
  Sort sequence  . . . . . . . . . . . :   *HEX
    Library  . . . . . . . . . . . . . :
  Language identifier  . . . . . . . . :   *JOBRUN
  Enable performance collection:
    Collection level . . . . . . . . . :   *PEP
  Profiling data . . . . . . . . . . . :   *NOCOL
  Coded character set ID . . . . . . . :   *JOBRUN
  Arithmetic mode. . . . . . . . . . . :   *NOEXTEND
  Padding character:
    Single byte to national  . . . . . :   NX"0020"
    Double byte to national  . . . . . :   NX"3000"
    National to national . . . . . . . :   NX"3000"
Include directory  . . . . . . . . . . :   *NONE
Generate program information . . . . . :   *NO
Compiler . . . . . . . . . . . . . . . :   IBM ILE COBOL

Figure 11. CRTBNDCBL Command Summary Listing


5722WDS V5R3M0  030905 LN  IBM ILE COBOL          CBLGUIDE/SAMPLE      ISERIES1   03/09/15 11:18:21        Page      1
Command  . . . . . . . . . . . . . . . :   CRTBNDCBL
Actual Values:
  Program  . . . . . . . . . . . . . . :   SAMPLE
    Library  . . . . . . . . . . . . . :     CBLGUIDE
  Source file  . . . . . . . . . . . . :   QCBLLESRC
    Library  . . . . . . . . . . . . . :     CBLGUIDE
    CCSID  . . . . . . . . . . . . . . :   37
  Source member  . . . . . . . . . . . :   SAMPLE         02/03/05 14:13:55
  Text 'description' . . . . . . . . . :   *BLANK
Command Options:
  Program  . . . . . . . . . . . . . . :   SAMPLE
    Library  . . . . . . . . . . . . . :     CBLGUIDE
  Source file  . . . . . . . . . . . . :   QCBLLESRC
    Library  . . . . . . . . . . . . . :     CBLGUIDE
  Source member  . . . . . . . . . . . :   SAMPLE
  Output . . . . . . . . . . . . . . . :   *PRINT
  Generation severity level  . . . . . :   30
  Text 'description' . . . . . . . . . :   *SRCMBRTXT
  Compiler options . . . . . . . . . . :   *IMBEDERR
  Conversion options . . . . . . . . . :   *NONE
  Message limit:
    Number of messages . . . . . . . . :   *NOMAX
    Message limit severity . . . . . . :   30
  Debug view . . . . . . . . . . . . . :   *STMT
  Optimize level . . . . . . . . . . . :   *NONE
  FIPS flagging  . . . . . . . . . . . :   *NOFIPS *NOOBSOLETE
  Extended display options . . . . . . :   *NONE
  Flagging severity  . . . . . . . . . :   0
  Replace program  . . . . . . . . . . :   *YES
  Simple program . . . . . . . . . . . :   *YES
  Authority  . . . . . . . . . . . . . :   *LIBCRTAUT
  Link literal . . . . . . . . . . . . :   *PGM
  Target release . . . . . . . . . . . :   *CURRENT
  User profile . . . . . . . . . . . . :   *USER
  Sort sequence  . . . . . . . . . . . :   *HEX
    Library  . . . . . . . . . . . . . :
  Language identifier  . . . . . . . . :   *JOBRUN
  Enable performance collection:
    Collection level . . . . . . . . . :   *PEP
  Binding directory  . . . . . . . . . :   *NONE
    Library  . . . . . . . . . . . . . :
  Activation group . . . . . . . . . . :   QILE
  Profiling data . . . . . . . . . . . :   *NOCOL
  Coded character set ID . . . . . . . :   *JOBRUN
  Arithmetic mode. . . . . . . . . . . :   *NOEXTEND
  Padding character:
    Single byte to national  . . . . . :   NX"0020"
    Double byte to national  . . . . . :   NX"3000"
    National to national . . . . . . . :   NX"3000"
Include directory  . . . . . . . . . . :   *NONE
Generate program information . . . . . :   *NO
  Compiler . . . . . . . . . . . . . . :   IBM ILE COBOL

Identifying the Compiler Options in Effect

The PROCESS statement, if specified, is printed first. Figure 12 is a list of all options in effect for the compilation of the program example: the options specified in the CRTCBLMOD command, as modified by the PROCESS statement. Compiler options are listed at the beginning of all compiler output when the OPTIONS parameter is specified.

Figure 12. List of Options in Effect


 5722WDS V5R3M0  030905 LN  IBM ILE COBOL            CBLGUIDE/SAMPLE       ISERIES1   03/09/15 11:18:21      Page    2
                                     S o u r c e
  STMT PL SEQNBR -A 1 B..+....2....+....3....+....4....+....5....+....6....+....7..IDENTFCN  S COPYNAME   CHG DATE
           000100 PROCESS OPTIONS, SOURCE, VBSUM, MAP,
           000200         FLAG(00), MINIMUM, OBSOLETE, XREF
                     COBOL Compiler Options in Effect
                          SOURCE
                          XREF
                          GEN
                          NOSEQUENCE
                          VBSUM
                          NONUMBER
                          MAP
                          OPTIONS
                          QUOTE
                          NOSECLVL
                          PRTCORR
                          MONOPRC
                          RANGE
                          NOUNREF
                          NOSYNC
                          NOCRTF
                          NODUPKEYCHK
                          NOINZDLT
                          NOBLK
                          STDINZ
                          NODDSFILLER
                          IMBEDERR
                          STDTRUNC
                          NOCHGPOSSGN
                          NOEVENTF
                          MONOPIC
                          NONATIONAL
                          NOLSPTRALIGN
                          NOCOMPASBIN
                          OUTPUT
                          GENLVL(30)
                          NOOPTIMIZE
                          MINIMUM
                          OBSOLETE
                          DFRWRT
                          UNDSPCHR
                          ACCUPDALL
                          FLAG(0)
                          LINKPGM
                          SRTSEQ(*HEX      )
                          LANGID(*JOBRUN   )
                          ENBPFRCOL(PEP)
                          PRFDTA(NOCOL)
                          CCSID(JOBRUN CCSID CCSID)
                          DATTIM(1900 40)
                          THREAD(NOTHREAD)
                          ARITHMETIC(NOEXTEND)
                          NTLPADCHAR(NX"0020" NX"3000" NX"3000")
                          OPTVALUE(NOOPT)
                          NOGRAPHIC
                     COBOL Conversion Options in Effect
                          NOVARCHAR
                          NODATETIME
                          NOCVTPICXGRAPHIC
                          NOFLOAT
                          NODATE
                          NOTIME
                          NOTIMESTAMP
                          NOCVTTODATE
                          NOCVTPICNGRAPHIC

Source Listing

Figure 13 illustrates a source listing. The statements in the source program are listed exactly as submitted except for program source text that is identified in the REPLACE statement. The replacement text will appear in the source listing. After the page in which the PROGRAM-ID paragraph is listed, all compiler output pages have the program-id name listed in the heading before the system name.

Figure 13. An Example of an ILE COBOL Source Listing


 5722WDS V5R3M0  030905 LN  IBM ILE COBOL            CBLGUIDE/SAMPLE      ISERIES1   03/09/15 11:18:21      Page    4
STMT PL SEQNBR -A 1 B..+....2....+....3....+....4....+....5....+....6....+....7..IDENTFCN  S COPYNAME   CHG DATE
   (A) (B)    (C)                                                                         (D)    (E)        (F)
     1     000300 IDENTIFICATION DIVISION.
     2     000500 PROGRAM-ID.     SAMPLE.
     3     000600   AUTHOR.       PROGRAMMER NAME.
     4     000700   INSTALLATION. COBOL DEVELOPMENT CENTRE.
     5     000800   DATE-WRITTEN. 02/24/94.
     6     000900   DATE-COMPILED. 02/02/05 11:18:21
     7     001100 ENVIRONMENT DIVISION.
     8     001300 CONFIGURATION SECTION.
     9     001400 SOURCE-COMPUTER. IBM-ISERIES
    10     001500 OBJECT-COMPUTER. IBM-ISERIES
    11     001700 INPUT-OUTPUT SECTION.
    12     001800 FILE-CONTROL.
    13     001900     SELECT FILE-1 ASSIGN TO DISK-SAMPLE.
    15     002100 DATA DIVISION.
    16     002300 FILE SECTION.
    17     002400 FD  FILE-1
           002500     LABEL RECORDS ARE STANDARD
*==>                  a
*=a> LNC0848   0  The LABEL clause is syntax checked and ignored.  (G)
           002600     RECORD CONTAINS 20 CHARACTERS
           002700     DATA RECORD IS RECORD-1.
*==>                  a
*=a> LNC0848   0  The DATA RECORDS clause is syntax checked and ignored.
    18     002800 01  RECORD-1.
    19     002900   02 FIELD-A      PIC X(20).
    20     003100 WORKING-STORAGE SECTION.
    21     003200 01  SUBSCRIPT-TYPE   TYPEDEF   PIC S9(2) COMP-3.
    22     003300 01  FILLER.
    23     003400   05 KOUNT        TYPE SUBSCRIPT-TYPE.
    24     003500   05 LETTERS      PIC X(26) VALUE "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
    25     003600   05 ALPHA REDEFINES LETTERS
           003700                   PIC X(1) OCCURS 26 TIMES.
    26     003800   05 NUMBR        TYPE SUBSCRIPT-TYPE.
    27     003900   05 DEPENDENTS   PIC X(26) VALUE "01234012340123401234012340".
    28     004000   05 DEPEND REDEFINES DEPENDENTS
           004100                   PIC X(1)  OCCURS 26 TIMES.
           004200 COPY WRKRCD.
    29    +000100 01  WORK-RECORD.                                                             WRKRCD
    30    +000200   05 NAME-FIELD   PIC X(1).                                                  WRKRCD
    31    +000300   05 FILLER       PIC X(1)  VALUE SPACE.                                     WRKRCD
    32    +000400   05 RECORD-NO    PIC S9(3).                                                 WRKRCD
    33    +000500   05 FILLER       PIC X(1)  VALUE SPACE.                                     WRKRCD
    34    +000600   05 LOCATION     PIC A(3)  VALUE "NYC".                                     WRKRCD
    35    +000700   05 FILLER       PIC X(1)  VALUE SPACE.                                     WRKRCD
 5722WDS V5R3M0  030905 LN  IBM ILE COBOL          CBLGUIDE/SAMPLE       ISERIES1   03/09/15 11:18:21        Page      5
  STMT PL SEQNBR -A 1 B..+....2....+....3....+....4....+....5....+....6....+....7..IDENTFCN  S COPYNAME   CHG DATE
    36    +000800   05 NO-OF-DEPENDENTS                                                        WRKRCD
          +000900                   PIC X(2).                                                  WRKRCD
    37    +001000   05 FILLER       PIC X(7)  VALUE SPACES.                                    WRKRCD
    38     004300 77  WORKPTR USAGE POINTER.
           004500*****************************************************
           004600* THE FOLLOWING PARAGRAPH OPENS THE OUTPUT FILE TO  *
           004700* BE CREATED AND INITIALIZES COUNTERS               *
           004800*****************************************************
    39     004900 PROCEDURE DIVISION.
           005100 STEP-1.
    40     005200     OPEN OUTPUT FILE-1.
    41     005300     MOVE ZERO TO KOUNT, NUMBR.
           005500*****************************************************
           005600* THE FOLLOWING 3 PARAGRAPHS CREATE INTERNALLY THE  *
           005700* RECORDS TO BE CONTAINED IN THE FILE, WRITES THEM  *
           005800* ON THE DISK, AND DISPLAYS THEM                    *
           005900*****************************************************
           006000 STEP-2.
    42     006100     ADD 1 TO KOUNT, NUMBR.
    43     006200     MOVE ALPHA  (KOUNT) TO NAME-FIELD.
    44     006300     MOVE DEPEND (KOUNT) TO NO-OF-DEPENDENTS.
    45     006400     MOVE NUMBR          TO RECORD-NO.
           006600 STEP-3.
    46     006700     DISPLAY WORK-RECORD.
    47     006800     WRITE RECORD-1 FROM WORK-RECORD.
           007000 STEP-4.
    48     007100     PERFORM STEP-2 THRU STEP-3 UNTIL KOUNT IS EQUAL TO 26.
           007300*****************************************************
           007400* THE FOLLOWING PARAGRAPH CLOSES FILE OPENED FOR    *
           007500* OUTPUT AND RE-OPENS IT FOR INPUT                  *
           007600*****************************************************
           007700 STEP-5.
    49     007800     CLOSE FILE-1.
    50     007900     OPEN INPUT FILE-1.
           008100*****************************************************
           008200* THE FOLLOWING PARAGRAPHS READ BACK THE FILE AND   *
           008300* SINGLE OUT EMPLOYEES WITH NO DEPENDENTS           *
           008400*****************************************************
           008500 STEP-6.
    51     008600     READ FILE-1 RECORD INTO WORK-RECORD
    52     008700       AT END GO TO STEP-8.
           008900 STEP-7.
    53     009000     IF NO-OF-DEPENDENTS IS EQUAL TO "0"
    54     009100       MOVE "Z" TO NO-OF-DEPENDENTS.
    55     009200     GO TO STEP-6.
           009400 STEP-8.
    56     009500     CLOSE FILE-1.
    57     009600     STOP RUN.
*==>                          a
*=a> LNC0650   0  Blocking/Deblocking for file 'FILE-1' will be performed by compiler-generated code.
                           * * * * *   E N D   O F   S O U R C E   * * * * *

Figure 13 displays the following fields:

(A)
Compiler-generated statement number: The numbers appear to the left of the source program listing. These numbers are referenced in all compiler output listings except for FIPS listings. A statement can span several lines, and a line can contain more than one statement. When a sequence of ILE COBOL source programs exist in the input source member, the statement number is reset to 1 at each new compilation unit. The statement number is not reset in a single compilation unit that may contain one or more nested COBOL programs.

(B)
Program nesting level: The number that appears in this field indicates the degree of nesting of the program.

(C)
Reference number: The numbers appear to the left of the source statements. The numbers that appear in this field and the column heading (shown as SEQNBR in this listing) are determined by an option specified in the CRTCBLMOD or CRTBNDCBL command or in the PROCESS statement, as shown in the following table:
Option Heading Origin
NONUMBER
SEQNBR
Source-file sequence numbers
NUMBER NUMBER User-supplied sequence numbers
LINENUMBER LINNBR Compiler-generated sequence numbers

(D)
Sequence error indicator column: An S in this column indicates that the line is out of sequence. Sequence checking is performed on the reference number field only if the SEQUENCE option is specified.

(E)
Copyname: The copyname, as specified in the ILE COBOL COPY statement, is listed here for all records included in the source program by that COPY statement. If the DDS-ALL-FORMATS phrase is used, the name <--ALL-FMTS appears under COPYNAME.

(F)
Change/date field: The date the line was last modified is listed here.

(G)
Imbedded error: The first level error message is imbedding in the listing after the line on which the error occurred. The clause, statement, or phrase causing the error is identified.

Verb Usage by Count Listing

Figure 14 shows the alphabetic list that is produced of all verbs used in the source program. A count of how many times each verb was used is also included. This listing is produced when the VBSUM option is specified.

Figure 14. Verb Usage by Count Listing


 5722WDS V5R3M0  030905 LN  IBM ILE COBOL                 CBLGUIDE/SAMPLE          ISERIES1   03/09/15 11:18:21        Page      7
                       V e r b   U s a g e   B y   C o u n t
 VERB                    COUNT
 ADD                         1
 CLOSE                       2
 DISPLAY                     1
 GOTO                        2
 IF                          1
 MOVE                        5
 OPEN                        2
 PERFORM                     1
 READ                        1
 STOP                        1
 WRITE                       1

Data Division Map

The Data Division map is listed when the MAP option is specified. It contains information about names in the ILE COBOL source program. The minimum number of bytes required for the File Section and Working-Storage Section is given at the end of the Data Division map.

Figure 15. Data Division Map


 5722WDS V5R3M0  030905 LN  IBM ILE COBOL                 CBLGUIDE/SAMPLE          ISERIES1   03/09/15 11:18:21        Page      8
                           D a t a   D i v i s i o n   M a p
  STMT LVL  SOURCE NAME                   SECTION    DISP   LENGTH  TYPE     ATTRIBUTES
   (H)  (I)     (J)                          (K)      (L)      (M)    (N)     (O)
    17  FD  FILE-1                           FS                              DEVICE DISK, ORGANIZATION SEQUENTIAL,
                                                                             ACCESS SEQUENTIAL, RECORD CONTAINS 20
                                                                             CHARACTERS
    18  01  RECORD-1                         FS  00000000       20  GROUP
    19  02  FIELD-A                          FS  00000000       20  AN
    21  01  SUBSCRIPT-TYPE                   WS  00000000        2  PACKED   TYPEDEF
    22  01  FILLER                           WS  00000000       56  GROUP
    23  05  KOUNT                            WS  00000000        2  PACKED   TYPE SUBSCRIPT-TYPE
    24  05  LETTERS                          WS  00000002       26  AN       VALUE
    25  05  ALPHA                            WS  00000002        1  AN       REDEFINES LETTERS, DIMENSION(26)
    26  05  NUMBR                            WS  00000028        2  PACKED   TYPE SUBSCRIPT-TYPE
    27  05  DEPENDENTS                       WS  00000030       26  AN       VALUE
    28  05  DEPEND                           WS  00000030        1  AN       REDEFINES DEPENDENTS, DIMENSION(26)
    29  01  WORK-RECORD                      WS  00000000       19  GROUP
    30  05  NAME-FIELD                       WS  00000000        1  AN
    31  05  FILLER                           WS  00000001        1  AN       VALUE
    32  05  RECORD-NO                        WS  00000002        3  ZONED
    33  05  FILLER                           WS  00000005        1  AN       VALUE
    34  05  LOCATION                         WS  00000006        3  A        VALUE
    35  05  FILLER                           WS  00000009        1  AN       VALUE
    36  05  NO-OF-DEPENDENTS                 WS  00000010        2  AN
    37  05  FILLER                           WS  00000012        7  AN       VALUE
    38  77  WORKPTR                          WS  00000000       16  POINTR
FILE SECTION uses at least 20 bytes of storage
WORKING-STORAGE SECTION uses at least 91 bytes of storage
                   * * * * *   E N D   O F   D A T A   D I V I S I O N   M A P   * * * * *

The Data Division map displays the following fields:

(H)
Statement number: The compiler-generated statement number where the data item was defined is listed for each data item in the Data Division map.

(I)
Level of data item: The level number of the data item, as specified in the source program, is listed here. Index-names are identified by an IX in the level-number and blank fields in the SECTION, DISP, LENGTH, and TYPE fields.

(J)
Source name: The data name, as specified in the source program, is listed here.

(K)
Section: The section where the item was defined is shown here through the use of the following codes:
   FS  File Section
   WS  Working-Storage Section
   LO  Local-Storage Section
   LS  Linkage Section
   SM  Sort/Merge Section
   SR  Special Register.

(L)
Displacement: The offset, in bytes, of the item from the level-01 group item is given here.

(M)
Length: The decimal length, in bytes, of the item is listed here.

(N)
Type: The data class type for the item is shown here through the use of the following codes:
Code Data Class Type
GROUP Group item
A Alphabetic
AN Alphanumeric
ANE Alphanumeric edited
DT Date
TM Time
TMS Timestamp
INDEX Index data item (USAGE INDEX)
BOOLN Boolean
ZONED Zoned decimal (external decimal)
PACKED Packed decimal (internal decimal) (USAGE COMP, COMP-3 or PACKED-DECIMAL)
BINARY Binary (USAGE COMP-4 or BINARY)
FLOAT Internal floating-point (USAGE COMP-1 or COMP-2)
EFLOAT External floating-point (USAGE DISPLAY)
NE Numeric edited
POINTR Pointer data item (USAGE POINTER)
PRCPTR Procedure-pointer data item (USAGE PROCEDURE-POINTER)
G DBCS
GE DBCS-edited

(O)
Attributes: The attributes of the item are listed here as follows:

FIPS Messages

The FIPS messages, Figure 16, are listed when the FLAGSTD parameter is specified. See FLAGSTD Parameter for more information about specifying the option for FIPS flagging. Only messages for the requested FIPS subset, optional modules and/or obsolete elements are listed.

Note:
The sequence number and column number are given for each time the message is issued.

Figure 16. FIPS Messages


 5722WDS V5R3M0  030905 LN  IBM ILE COBOL                 CBLGUIDE/SAMPLE          ISERIES1   03/09/15 11:18:21        Page      9
                         C O B O L   F I P S   M e s s a g e s
  FIPS-ID    DESCRIPTION AND SEQUENCE NUMBERS FLAGGED (Q)
    (P)
 LNC8100     Following items are obsolete language elements.
 LNC8102     AUTHOR paragraph.
                 000600    10
 LNC8103     DATE-COMPILED paragraph.
                 000900    10
 LNC8104     INSTALLATION paragraph.
                 000700    10
 LNC8105     DATE-WRITTEN paragraph.
                 000800    10
 LNC8117     LABEL RECORDS clause.
                 002500    12
 LNC8177     DATA RECORDS clause.
                 002700    12
 LNC8200     Following nonconforming standard items valid only at FIPS intermediate level or higher. (R)
 LNC8201     COPY statement.
                 004200     8
 LNC8500     Following nonconforming nonstandard items are IBM-defined or are IBM extensions.
 LNC8504     Assignment-name in ASSIGN clause.
                 001900    36
 LNC8518     USAGE IS COMPUTATIONAL-3.
                 003200    49
 LNC8520     USAGE IS POINTER or PROCEDURE-POINTER.
                 004300    26
 LNC8561     Default library assumed for COPY statement.
                 004200     8
 LNC8572     SKIP1/2/3 statement.
                 000400    13
                 001000    13
                 001200    13
                 001600    13
                 002000    13
                 002200    13
                 003000    13
                 004400    13
                 005000    13
                 005400    13
                 006500    13
                 006900    13
                 007200    13
                 008000    13
                 008800    13
                 009300    13
 LNC8616     TYPEDEF clause.
                 003200    29
 LNC8617     TYPE clause.
                 003400    26
                 003800    26
   30 FIPS violations flagged. (S)
                   * * * * *   E N D   O F   C O B O L   F I P S   M E S S A G E S   * * * * *

The FIPS messages consist of the following fields:

(P)
FIPS-ID: This field lists the FIPS message number.

(Q)
Description and reference numbers flagged: This field lists a description of the condition flagged, followed by a list of the reference numbers from the source program where this condition is found.

The type of reference numbers used, and their names in the heading (shown as SEQUENCE NUMBERS in this listing) are determined by an option specified in the CRTCBLMOD or CRTBNDCBL command or in the PROCESS statement, as shown in the following table:

Option Heading
NONUMBER DESCRIPTION AND SEQUENCE NUMBERS FLAGGED
NUMBER DESCRIPTION AND USER-SUPPLIED NUMBERS FLAGGED
LINENUMBER DESCRIPTION AND LINE NUMBERS FLAGGED

(R)
Items grouped by level: These headings subdivide the FIPS messages by level and category.

(S)
FIPS violations flagged: The total number of FIPS violations flagged is included at the end of the FIPS listing.

Cross-Reference Listing

Figure 17 shows the cross-reference listing, which is produced when the XREF option is specified. It provides a list of all data references, procedure-name references, and program-name references, by statement number, within the source program.

Figure 17. Cross-Reference Listing


 5722WDS V5R3M0  030905 LN  IBM ILE COBOL                 CBLGUIDE/SAMPLE          ISERIES1   03/09/15 11:18:21        Page     10
                             C r o s s   R e f e r e n c e
Data References:
Data-type is indicated by the letter following a data-name definition.
These letters and their meanings are:
    E = EXTERNAL
    G = GLOBAL
    X = EXTERNAL and GLOBAL
DATA NAMES                      DEFINED  REFERENCES (* = CHANGED)
  (T)                             (U)       (V)
ALPHA                               25     43
DEPEND                              28     44
DEPENDENTS                          27     28
FIELD-A                             19
FILE-1                              17     40     49     50     51     56
KOUNT                               23     41*    42*    43     44     48
LETTERS                             24     25
LOCATION                            34
NAME-FIELD                          30     43*
NO-OF-DEPENDENTS                    36     44*    53     54*
NUMBR                               26     41*    42*    45
RECORD-NO                           32     45*
RECORD-1                            18     47*
WORK-RECORD                         29     46     47     51*
WORKPTR                             38
TYPE NAMES                      DEFINED  REFERENCES (* = CHANGED)
SUBSCRIPT-TYPE                      21     23     26
Procedure References:
Context usage is indicated by the letter following a procedure-name reference.
These letters and their meanings are:
    A = ALTER (procedure-name)
    D = GO TO (procedure-name) DEPENDING ON
    E = End of range of (PERFORM) through (procedure-name)
    G = GO TO (procedure-name)
    P = PERFORM (procedure-name)
    T = (ALTER) TO PROCEED TO (procedure-name)
PROCEDURE NAMES                 DEFINED  REFERENCES
STEP-1                              39
STEP-2                              41     48P
STEP-3                              45     48E
STEP-4                              47
STEP-5                              48
STEP-6                              50     55G
STEP-7                              52
STEP-8                              55     52G
Program References:
Program-type of the external program is indicated by the word in a program-name definition.
These words and their meanings are:
    EPGM = a program object that is to be dynamically linked
    BPRC = a COBOL program or a C function or an RPG program that is to be bound
    SYS  = a system program
PROGRAM NAMES                   DEFINED  REFERENCES
SAMPLE                               2
                   * * * * *   E N D   O F   C R O S S   R E F E R E N C E   * * * * *

The cross-reference listing displays the following fields:

(T)
Names field: The data name, type name, procedure name, or program name referenced is listed here. The names are listed alphabetically. Program names may be qualified by a library name.

(U)
Defined field: The statement number where the name was defined within the source program is listed here.

(V)
References field: All statement numbers are listed in the same sequence as the name is referenced in the source program. An * following a statement number indicates that the item was modified in that statement.

Messages

Figure 18 shows the messages that are generated during program compilation.

Figure 18. Diagnostic Messages


 5722WDS V5R3M0  030905 LN  IBM ILE COBOL                 CBLGUIDE/SAMPLE          ISERIES1   03/09/15 11:18:21        Page     12
                                    M e s s a g e s
   STMT
 (W)                  (Y)                     (X)
*    17  MSGID: LNC0848  SEVERITY:  0  SEQNBR:  002500
         Message . . . . :   The LABEL clause is syntax checked and ignored.  (Z)
*    17  MSGID: LNC0848  SEVERITY:  0  SEQNBR:  002700
         Message . . . . :   The DATA RECORDS clause is syntax checked and
           ignored.
*    57  MSGID: LNC0650  SEVERITY:  0  SEQNBR:  009600
         Message . . . . :   Blocking/Deblocking for file 'FILE-1' will be
           performed by compiler-generated code.
                                         Message Summary
Message totals:  (AA)
   Information (00-04) . . . . . . . . :      3
   Warning     (05-19) . . . . . . . . :      0
   Error       (20-29) . . . . . . . . :      0
   Severe      (30-39) . . . . . . . . :      0
   Terminal    (40-99) . . . . . . . . :      0
   --------------------------------------------
   Total                                      3
                        * * * * *   E N D   O F   M E S S A G E S   * * * * *
Statistics:  (BB)
   Source records read . . . . . . . . :     96
   Copy records read . . . . . . . . . :     10
   Copy members processed  . . . . . . :      1
   Sequence errors . . . . . . . . . . :      0
   Highest severity message issued . . :      0
  LNC0901  0  Program SAMPLE created in library CBLGUIDE on 00/08/17 at 11:18:23.
                      * * * * *   E N D   O F   C O M P I L A T I O N   * * * * *

The fields displayed are:

(W)
Statement number: This field lists the compiler-generated statement number associated with the statement in the source program for which the message was issued. 1
Note:
The statement number and the reference number do not appear on certain messages that reference missing items. For example, if the PROGRAM-ID paragraph is missing, message LNC0031 appears on the listing with no statement or reference number listed.

(X)
Reference number: The reference number is issued here. 1 The numbers that appear in this field and the column heading (shown here as SEQNBR) are determined by an option specified in the CRTCBLMOD or CRTBNDCBL command or in the PROCESS statement, as shown in the following table:

Heading Origin
NONUMBER SEQNBR Source-file sequence numbers
NUMBER NUMBER User-supplied sequence numbers
LINENUMBER LINNBR Compiler-generated sequence numbers

When a message is issued for a record from a copy file, the number is preceded by a +.

(Y)
MSGID and Severity Level: These fields contain the message number and its associated severity level. Severity levels are defined as follows:
00
Informational
10
Warning
20
Error
30
Severe Error
40
Unrecoverable (usually a user error)
50
Unrecoverable (usually a compiler error)

(Z)
Message: The message identifies the condition and indicates the action taken by the compiler.

(AA)
Message statistics: This field lists the total number of messages and the number of messages by severity level.

The totals listed are the number of messages generated for each severity by the compiler and are not always the number listed. For example, if FLAG(10) is specified, no messages of severity less than 10 are listed. The counts, however, do indicate the number that would have been printed if they had not been suppressed.

(BB)
Compiler statistics: This field lists the total number of source records read, copy records read, copy members processed, sequence errors encountered, and the highest severity message issued.

Footnotes:

1
The statement number and the reference number do not appear on certain messages that reference missing items. For example, if the PROGRAM-ID paragraph is missing, message LNC0031 appears on the listing with no statement or reference number listed.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]