Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)

Procedure Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual426750-001
6-31
COPY Statement
?SECTION copy-text-1
text-1
When a library file begins like this, this text could be comments about the library
contents.
In the following example, notice that employee-detail of the COPY statement is not
qualified because the copy library, named COPYLIB, resides on the default volume and
subvolume for the compilation.
The contents of the copy library COPYLIB are as follows:
?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.
The SCREEN COBOL source code is as follows:
DATA DIVISION.
WORKING-STORAGE SECTION.
COPY employee-detail.
In the compile listing in the example below, all lines from a copy library are marked
with a <.
DATA DIVISION.
WORKING-STORAGE SECTION.
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.