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
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.
L 11 DISPLAY "POIUYTREWQ".
L 12 DISPLAY "POIUYTREWQ".
L 13 DISPLAY "POIUYTREWQ".
14 STOP RUN.
Compaq COBOL for OpenVMS VAX Listing File for Multiple COPY Statements
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 COPY LCOP1J.
13L DISPLAY "POIUYTREWQ".
14C COPY LCOP1J.
15L DISPLAY "POIUYTREWQ".
16 STOP RUN.
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
-----------------------------------------------------------
13 P0. MOVE COPY LCOP5D. TO ALPHA.
L 14 "O"
Compaq COBOL for OpenVMS VAX Listing File for COPY Statement
-----------------------------------------------------------
13 P0. MOVE COPY LCOP5D.
14L "O"
15C TO ALPHA.
Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and Migration B–13