COBOL Manual for TNS and TNS/R Programs
Creating and Compiling HP COBOL Source
Programs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
22-43
Source Program Listing
Topics:
•
Identification Field
•
Line Number
•
Sequence Number
•
Indicator Area and Beyond
•
Text Altered by REPLACE Statement
•
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.