Compiler Listing [ HP COBOL II/XL Programmer's Guide ] MPE/iX 5.0 Documentation
HP COBOL II/XL Programmer's Guide
Compiler Listing
The compiler listing that the compiler produces when you specify the
control options MAP and VERBS provides most of the information that you
need to debug your program. The remainder of the information is supplied
by the link map. For information on the MAP and VERBS control options,
see Chapter 6 . For information on the link map, see "Link Map,"
under "Using Debug."
The following is a compiler listing for a program that includes the
control options MAP, VERBS, and CROSSREF. Explanations for the bold,
bracketed numbers follow the listing.
[1] [2] [3]
PAGE 0001 HEWLETT-PACKARD 31500A.00.00 [85] COBOL II/XL THU, MAR 12, 1987,
11:23 AM (C) HEWLETT-PACKARD CO. 1987
[4]
00001 COBCNTL 001000* COBCNTL.PUB.SYS Defaults are: \
00002 COBCNTL 002000*CONTROL LIST,SOURCE,NOCODE,NOCROSSREF,ERRORS=100,NOVERBS, |
WARN | [5]
00003 COBCNTL 003000*CONTROL LINES=60,NOMAP,MIXED,QUOTE=",NOSTDWARN,SYNC32, |
INDEX32 /
00004 004700$control ansisort
00005 INFO=$control dynamic,verbs,crossref,map [6]
00007 001000 IDENTIFICATION DIVISION.
00008 002000 PROGRAM-ID. DATEFORMAT.
00009 003000 ENVIRONMENT DIVISION.
00010 004000 DATA DIVISION.
00011 005000 WORKING-STORAGE SECTION.
00012 006000 77 PGM-ID PIC X(10) VALUE 'DATEFORMAT'.
00013 007000 01 CHAR-CNT PIC S9(4) BINARY.
00014 008000 01 YEAR-4 PIC 9999.
00015 009000 01 MONTH-NAMES.
00016 010000 05 PIC X(10) VALUE "JANUARY".
00017 011000 05 PIC X(10) VALUE "FEBRUARY".
00018 012000 05 PIC X(10) VALUE "MARCH".
00019 013000 05 PIC X(10) VALUE "APRIL".
00020 014000 05 PIC X(10) VALUE "MAY".
00021 015000 05 PIC X(10) VALUE "JUNE".
00022 016000 05 PIC X(10) VALUE "JULY".
00023 017000 05 PIC X(10) VALUE "AUGUST".
00024 018000 05 PIC X(10) VALUE "SEPTEMBER".
00025 019000 05 PIC X(10) VALUE "OCTOBER".
00026 020000 05 PIC X(10) VALUE "NOVEMBER".
00027 021000 05 PIC X(10) VALUE "DECEMBER".
00028 022000 01 MONTH-TABLE REDEFINES MONTH-NAMES.
00029 023000 05 MONTH-NAME PIC X(10) OCCURS 12 TIMES
00030 024000 INDEXED BY I.
00031 025000 LINKAGE SECTION.
00032 026000 01 DATE-IN.
00033 027000 05 YY-IN PIC 99.
00034 028000 05 MM-IN PIC 99.
00035 029000 05 DD-IN PIC 99.
00036 +030000 01 DATE-OUT PIC X(30).
[7] [8] [9] [10] [11]
00037 031000 PROCEDURE DIVISION USING DATE-IN DATE-OUT.
00038 032000 STARTA.
00039 033000 display "date-format" date-in
00040 034000 SET I TO MM-IN
00041 035000 ADD 1900 TO YY-IN GIVING YEAR-4
00042 036000 MOVE 1 TO CHAR-CNT
00043 037000 STRING MONTH-NAME(I) DELIMITED BY " "
00044 038000 INTO DATE-OUT
00045 039000 WITH POINTER CHAR-CNT
00046 040000 END-STRING
00047 041000 STRING " " DD-IN ", " YEAR-4 DELIMITED BY SIZE
00048 042000 INTO DATE-OUT
00049 043000 WITH POINTER CHAR-CNT
00050 044000 END-STRING
00051 045000 MOVE SPACES TO DATE-OUT(CHAR-CNT:).
00052 046000
00053 047000 EXIT-PARA.
00054 048000 EXIT PROGRAM.
[12]
PAGE 0002/COBTEXT DATEFORMAT SYMBOL TABLE MAP
LINE# LVL SOURCE NAME BASE OFFSET SIZE USAGE CATEGORY R O J BZ
[25][26]
WORKING-STORAGE SECTION
00012 77 PGM-ID SP -114 A DISP AN
00013 01 CHAR-CNT SP -108 2 COMP NS
00014 01 YEAR-4 SP -104 4 DISP N
00015 01 MONTH-NAMES SP -100 78 DISP AN
00016 05 FILLER SP -100 A DISP AN
00017 05 FILLER SP -F6 A DISP AN
00018 05 FILLER SP -EC A DISP AN
00019 05 FILLER SP -E2 A DISP AN
00020 05 FILLER SP -D8 A DISP AN
00021 05 FILLER SP -CE A DISP AN
00022 05 FILLER SP -C4 A DISP AN
00023 05 FILLER SP -BA A DISP AN
00024 05 FILLER SP -B0 A DISP AN
00025 05 FILLER SP -A6 A DISP AN
00026 05 FILLER SP -9C A DISP AN
00027 05 FILLER SP -92 A DISP AN
00028 01 MONTH-TABLE SP -100 78 DISP AN R [23]
00029 05 MONTH-NAME SP -100 A DISP AN O [24]
I SP -11C 4 INDEX NAME
LINKAGE SECTION
00032 01 DATE-IN P 00 0 6 DISP AN
00033 05 YY-IN P 00 0 2 DISP N
00034 05 MM-IN P 00 2 2 DISP N
00035 05 DD-IN P 00 4 2 DISP N
00036 01 DATE-OUT P 01 0 1E DISP AN
[13] [14] [15] [16] [17][18] [19][20] [21] [22]
NOTE The symbol table map on PAGE 0002 is due to the control option MAP.
The address of each data name in the program is specified in terms
of base and offset to that base.
[12]
PAGE 0003/COBTEXT DATEFORMAT SYMBOL TABLE MAP
LINE# LVL SOURCE NAME BASE OFFSET SIZE USAGE CATEGORY R O J BZ
STORAGE LAYOUT (#ENTRYS)
FIRST TIME FLAG SP -130 4 \
RUN TIME $ . , SP -124 4 |
SORT/MERGE PLABEL SP -120 4 |
INDEX TABLE (1) SP -11C 4 | [27]
TALLY SP -118 4 |
USER STORAGE SP -118 90 |
PARAMETER POINTERS (2) SP -88 8 |
TEMPCELL pool SP -80 44 /
[28]
NOTE The symbol table map on PAGE 0003 is due to the control option MAP.
The address of each data name in the program is specified in terms
of base and offset to that base.
PAGE 0004/COBTEXT DATEFORMAT STATEMENT OFFSETS
Entry = dateformat [29]
STMT OFFSET STMT OFFSET STMT OFFSET STMT OFFSET ...
38 84 40 BC 42 188 50 214 53 304
39 84 41 114 46 194 51 2D0 54 308
[30] [31]
NOTE The verb map on PAGE 0004 is due to the control option VERBS.
PAGE 0005/COBTEXT DATEFORMAT CROSS REFERENCE LISTING
IDENTIFIERS
CHAR-CNT 00013 00042 00045 00049 00051
DATE-IN 00032 00037 00039
DATE-OUT 00036 00037 00044 00048 00051
DD-IN 00035 00047
I 00030 00040 00043
MM-IN 00034 00040
MONTH-NAME 00029 00043
MONTH-NAMES 00015 00028
MONTH-TABLE 00028
PGM-ID 00012
YEAR-4 00014 00041 00047
YY-IN 00033 00041
[32] [33]
PAGE 0006/COBTEXT DATEFORMAT CROSS REFERENCE LISTING
PROCEDURES
EXIT-PARA 00053
STARTA 00038
PAGE 0007/COBTEXT DATEFORMAT COBOL ERRORS and WARNINGS [34]
COBOL ERRORS:
LINE # SEQ # COL ERROR SEV TEXT OF MESSAGE
------ ------ --- ----- --- ---------------
00046 040000 80 055 W LEFT TRUNCATION MAY OCCUR.
00050 044000 80 055 W LEFT TRUNCATION MAY OCCUR.
[35] [36] [37] [38] [39] [40]
0 ERRORS, 0 QUESTIONABLE, 2 WARNINGS
DATA AREA IS F4 BYTES. [41]
CPU TIME = 0:00:12. WALL TIME = 0:00:29.
[42] [43]
NOTE The cross reference on PAGE 0005 and PAGE 0006 is due to the
control option CROSSREF.[REV BEG] It lists the section, paragraph,
and program names separate from the identifiers and macros.[REV
END]
The bracketed numbers on the preceding compiler listing have these
meanings:
Number Meaning of Listing
[1] Version number of the compiler. Use this number when
communicating with Hewlett-Packard about this compiler.
[2] Entry point (85 for ANSI85, 74 for ANSI74).
[3] Compilation date.
[4] Copyright for compiler.
[5] Control file (COBCNTL.PUB.SYS here).
[6] info string.
[7] Compiler-generated listing line number (also called statement
number).
[8] Columns 73 through 80 of the source file. If the source contains
a copy module from a COPYLIB, these columns contain the module
name.
Anything in columns 73 through 80 appears on the compiler
listing. In a macro or include file, it is good programming
practice to put the name of the macro or included file in columns
73 through 80, so that the compiler listing will identify those
source lines as being from that macro or included file.
[9] If both COBMAST and COBTEXT are specified, a plus (+) appears in
this column of each line of the file COBTEXT.
[10] Columns one through six of the source file (source sequence
number).
[11] Columns seven through 72 of the source file (COBOL source code).
[12] PROGRAM-ID.
[13] Compiler-generated listing line number (same as [7]).
[14] Level number.
[15] Data name.
[16] Base. Possible bases are:
Base Use
DP Main program storage.
SP Subprograms with dynamic storage (control option
DYNAMIC or INITIAL clause in the PROGRAM-ID
paragraph).
OWN Subprograms with static storage (control option
ANSISUB or SUBPROGRAM).
Pnn Parameter number nn.
EXT External item.
CODE Literals used in program.
[17] Offset from base (in hexadecimal, positive or negative).
[18] An asterisk after an offset indicates non-optimal alignment of
data name.
[19] Size in bytes (hexadecimal).
[20] USAGE. Terms and meanings are:
Term Meaning
DISP DISPLAY.
COMP COMPUTATIONAL or BINARY.
COMP-SYNC COMPUTATIONAL SYNCHRONIZED or BINARY
SYNCHRONIZED.
COMP-3 COMPUTATIONAL-3 or PACKED-DECIMAL.
INDEX Index (in USAGE IS INDEX).
INDEX NAME Index name (in an INDEXED BY clause).
SEQUENTIAL Organization is sequential, access is
sequential.
RANDOM Access is random.
RELATIVE SEQUENTIAL Organization is relative, access is
sequential.
RELATIVE RANDOM Organization is relative, access is
random.
RELATIVE DYNAMIC Organization is relative, access is
dynamic.
INDEXED SEQUENTIAL Organization is indexed, access is
sequential.
INDEXED RANDOM Organization is indexed, access is random.
INDEXED DYNAMIC Organization is indexed, access is
dynamic.
[21] Asterisk before category indicates unsigned binary or packed
decimal item (arithmetic is faster with signed numbers than
unsigned numbers).
[22] Category. The categories and their meanings are:
Category Meaning
N Numeric
A Alphabetic
AN Alphanumeric
NE Numeric edited
ANE Alphanumeric edited
NS Signed numeric, sign trailing
SN Signed numeric, sign leading
NS-SEP Signed numeric; sign trailing, separate
SEP-SN Signed numeric; sign leading, separate
[23] R indicates REDEFINES clause.
[24] O indicates OCCURS clause.
[25] J indicates JUSTIFIED clause.
[26] BZ indicates BLANK WHEN ZERO clause.
[27] Internal compiler data. Only the PARAMETER POINTERS are useful
to you. It gives the address of the addresses of the subprogram
parameters.
[28] Number of parameters, files, or index names (decimal).
[29] Offsets in this map are offsets to this location. This is the
PROGRAM-ID name or chunk name.
[30] Compiler-generated listing line number (same as [7]).
[31] Offset from entry or chunk (hexadecimal).
[32] Name (possibly qualified).
[33] Listing line numbers that reference the name (the first number is
the line on which the name is declared).
[34] Error message listing.
[35] Approximate listing line number of error.
[36] Approximate source sequence number of error.
[37] Approximate column location of error (column 80 if the error was
detected during code generation).
[38] Error number.
[39] Severity of error.
[40] Error message text.[REV BEG]
[41] Approximate total data area size (hexadecimal).[REV END]
[42] CPU time required to compile the program (hh:mm:ss).
[43] Elapsed time required to compile the program (hh:mm:ss).
MPE/iX 5.0 Documentation