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

Similarly, the compiler interprets the character sequence X/9 as one text-word (presumably
a PICTURE character-string) rather than as three text-words; however, the compiler always
considers a left parenthesis, right parenthesis, or colon character to be a separator unless it
appears within a nonnumeric literal.
Another reason to carefully observe the reference format rules is that, when the compiler is
performing replacement editing, it analyzes library text without the benefit of any contextual
information.
Including COPY Statements in a Listing
The SHOWCOPY directive determines whether the COPY statement itself appears in the listing
(see SHARED (page 568)). If you do not specify NOSHOWCOPY, NOLIST, or SUPPRESS, the
compiler lists the COPY statement as a comment followed by the copied text.
In Example 144, EMPLOYEE-DETAIL of the COPY statement is not qualified because the COPY
library is named COPYLIB and resides on the current volume and subvolume for the compile process.
Example 144 COPY Statement
Contents of COPY library COPYLIB:
?SECTION EMPLOYEE-DETAIL
01 EMP-DATA-IN.
05 EMP-NO PIC X(05).
05 EMP-NAME PIC X(20).
05 DEPT PIC X(03).
05 JOB-CLASS PIC X(05).
05 HOURLY-RATE PIC 9(3)V99.
05 DEDUCTIONS PIC 9(3)V99.
05 SALARY PIC 9(7)V99.
Source COBOL code:
...
DATA DIVISION.
FILE SECTION.
FD EMP-MASTER
COPY EMPLOYEE-DETAIL.
FD LIST-OUT
...
Source listing produced by compiler (lines from the COPY library are marked by < in the compilation
listing):
...
DATA DIVISION.
FILE SECTION.
FD EMP-MASTER
*COPY EMPLOYEE-DETAIL.
< 01 EMP-DATA-IN.
< 05 EMP-NO PIC X(05).
< 05 EMP-NAME PIC X(20).
< 05 DEPT PIC X(03).
< 05 JOB-CLASS PIC X(05).
< 05 HOURLY-RATE PIC 9(3)V99.
< 05 DEDUCTIONS PIC 9(3)V99.
< 05 SALARY PIC 9(7)V99.
FD list-out
...
502 Source Text Manipulation