COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

Text Retrieved by COPY Statement
Text Retrieved by SOURCE Directive
SQL/MP and SQL/MX Statements
Identification Field
The identification field is copied from columns 72 through 80 of ANSI format source lines. Some
installations use these columns for marking revisions to the program.
Line Number
When the file being listed is an EDIT file, the line number in the listing is the EDIT file line number.
If the file is in ANSI format, the fractional part of the number, if any, is omitted.
When the file being listed is not an EDIT file, the line number in the listing is a “synthetic” line
number (an integer that the compiler generates). Every time the compiler reads a line of input from
the file, it increments a counter by 1.
Sequence Number
When the file is in ANSI format, the compiler copies columns 1 through 6 of the input line to this
field. Some COBOL implementations use this field as a sequence number, and if the values are
not in ascending order, these implementations report a diagnostic. HP COBOL does no such
reporting.
Indicator Area and Beyond
Beginning with the indicator area, the two formats are the same. If, in Tandem format, the input
line exceeds 120 characters, it will not fit on the 132-character print line. The compiler wraps such
lines onto the next line, beginning at print column 1.
Text Altered by REPLACE Statement
Each REPLACE statement is listed as the compiler encounters it. Each line on which a REPLACE
statement has made a change is listed after the change has been made. If the line is too long, the
compiler truncates it after a reasonable token and writes as many additional lines (with the same
line number) as are necessary to deliver the entire replaced text.
Text Retrieved by COPY Statement
The compiler marks any line containing text that it copied from a COPY library by displaying a
less than (>) character in printer column 9.
The compiler directives SHOWCOPY and NOSHOWCOPY determine how the compiler lists lines
containing COPY statements. The default, SHOWCOPY, causes the compiler to list both the line
containing the COPY statement (as a comment) and the line that results from the COPY statement.
The alternative, NOSHOWCOPY, causes the compiler to list only the line that results from the
COPY statement. NOSHOWCOPY makes it hard to determine from the listing where the copied
lines came from.
The HP COBOL COPY logic attempts to keep your listings readable by combining the original
source text line with the copied library text. HP COBOL COPY logic handles these cases:
Column Position of Library Text Characters
The compiler preserves the column position of library text characters; it does not shift text to
the left or right when it attempts this combining operation; for example:
Source line: MOVE COPY SOURCE1. TO X.
Library lines: ?SECTION SOURCE1
ABLE
Printed line: MOVE ABLE TO X.
If “ABLE” in the library line begins in column 1, you get:
Understanding and Controlling the Compiler Listing 771