General Notes
- Database files never have indicators.
- When the RECORD KEY clause specifies EXTERNALLY-DESCRIBED-KEY, a format can be copied only once under an FD. For example, if all of the formats of a file are copied under an FD, no other Format 2 COPY statement can be specified for the same file under that FD.
- If a separate storage area is needed in WORKING-STORAGE
or LOCAL-STORAGE for each format, an individual COPY statement
must be specified for each format.
For example, if we assume that the file CUSTMASTER contains two formats: CUSTADR and CUSTDETL ; then the following COPY statements could be specified.
SELECT FILE-X
ASSIGN TO DATABASE-CUSTMASTER.
.
.
.
FD FILE-X
LABEL RECORDS ARE STANDARD.
01 FILE-X-RECS.
COPY DDS-ALL-FORMATS OF
QGPL-CUSTMASTER. (See Note 1.)
.
.
.
WORKING-STORAGE SECTION.
01 ADR-REC.
COPY DDS-CUSTADR OF
CUSTMASTER. (See Note 2.)
01 DETAIL-REC.
COPY DDS-CUSTDETL OF
CUSTMASTER. (See Note 2.)
Note:
- This COPY statement generates only one storage area for all formats.
- These COPY statements generate separate storage areas.