Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and Migration
B.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior Differences
Compaq COBOL Listing File for Multiple COPY Statements
L
L
L
Compaq COBOL for OpenVMS VAX Listing File for Multiple COPY Statements
B.4.2.5 COPY Insert Statement
The compiler listing files for a Compaq COBOL program and a Compaq COBOL
for OpenVMS VAX program differ when a COPY statement inserts text in the
middle of a line.
In the following two compiler listing files, LCOP5D.LIB contains ''O''. The Compaq
COBOL compiler keeps the same line and inserts the COPY file contents below
the source line. The Compaq COBOL for OpenVMS VAX compiler splits the
original source line into parts.
Compaq COBOL Listing File for COPY Statement
Compaq COBOL for OpenVMS VAX Listing File for COPY Statement
Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and Migration B–13
1 IDENTIFICATION DIVISION.
2 PROGRAM-ID. DCOP1J.
3 *
4 *
Tests copy with three copy statements on 1 line.
5 *
6 ENVIRONMENT DIVISION.
7 DATA DIVISION.
8 PROCEDURE DIVISION.
9 THE.
10
COPY LCOP1J. COPY LCOP1J. COPY LCOP1J.
11
DISPLAY "POIUYTREWQ".
12
DISPLAY "POIUYTREWQ".
13
DISPLAY "POIUYTREWQ".
14
STOP RUN.
1
IDENTIFICATION DIVISION.
2
PROGRAM-ID. DCOP1J.
3
*
4
*
Tests copy with three copy statements on 1 line.
5
*
6
ENVIRONMENT DIVISION.
7
DATA DIVISION.
8
PROCEDURE DIVISION.
9
THE.
10
COPY LCOP1J.
11L
DISPLAY "POIUYTREWQ".
12C
13L
DISPLAY "POIUYTREWQ".
14C
15L
DISPLAY "POIUYTREWQ".
16
STOP RUN.
-----------------------------------------------------------
13 P0.
MOVE COPY LCOP5D. TO ALPHA.
L 14
-----------------------------------------------------------
13
P0. MOVE COPY LCOP5D.
14L
15C
COPY LCOP1J.
COPY LCOP1J.
"O"
"O"
TO ALPHA.
Need help?
Do you have a question about the COBOL AAQ2G1FTK and is the answer not in the manual?
Questions and answers