COBOL Manual for TNS and TNS/R Programs

Creating and Compiling HP COBOL Source
Programs
HP COBOL Manual for TNS and TNS/R Programs522555-006
22-44
Source Program Listing
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:
Printed lines: MOVE
ABLE TO X.
If “ABLE” in the library line begins in column 22, you get:
Printed lines: MOVE ABLE
TO X.