When the compile option SOURCE is specified, a source program listing is generated in the compiler list file. In addition, when the compiler option COPY is specified, library text fetched by the COPY statement is generated in the source program listing.
Source program listing output format
The output format of the source program listing is shown below.
LINE SEQNO A B [1] [2] 1 000100 IDENTIFICATION DIVISION. 2 000200 PROGRAM-ID. A. 3 000300* 4 000400 DATA DIVISION. 5 000500 WORKING-STORAGE SECTION. 6 000600 COPY A1. 1-1 C 000600 77 answer PIC 9(2). 1-2 C 000700 77 divisor PIC 9(2). 1-3 C 000800 77 dividend PIC 9(2). 7 000900* 8 001000 PROCEDURE DIVISION. 9 001100* 10 001200 MOVE 10 TO dividend. 11 001300 MOVE 0 TO divisor. 12 001400* 13 001500 COMPUTE answer = dividend / divisor. 14 001600* 15 001700 EXIT PROGRAM. 16 001800 END PROGRAM A.
[1] Line number
Line numbers are displayed in either of the following formats:
If the compiler option NUMBER is enabled
[COPY-qualification-value-]user-line-number
COPY-qualification-value
The identification number that is assigned to the library text included in the source program or to a line having a sequence number not in ascending order. COPY-qualification-value is assigned to COPY instructions or sequence numbers not in ascending order in single unit steps beginning with 1.
User-line-number
The value of the sequence number area in the source program. If a non-numeric character is included in the sequence number area, the sequence number of the line is changed to the immediately preceding, valid sequence number plus 1. When the same sequence number appears in sequence, it is accepted without assuming it is invalid.
If the compiler option NONUMBER is enabled
[COPY-qualification-value-]source-file-relative-number
COPY-qualification-value
The identification number that is assigned to the library text included in the source program. COPY-qualification-value is assigned to COPY instructions in single unit steps beginning with 1.
source-file-relative-number
The compiler assigns line numbers as source-file-relative-number in ascending order in single unit steps beginning with 1. Source-file-relative-number is also assigned to source files included with a COPY instruction in single unit steps beginning with 1, with "C" inserted between the line number and the source program to designate an inclusion of a source file.
[2] Source program itself.