Copy Optical File (CPYOFRDAR)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Copy Optical File (CPYOFRDAR) command copies a database file member to an optical file. Copy operations can be done from a physical or logical database member. You may copy data to a physical or logical optical file. No mapping of fields between the files is done by the copy operation. Therefore the data in both files must have the same field layouts and types. Records are always added to any existing records in the optical file.

Note: File overrides are not supported by this command.

Top

Parameters

Keyword Description Choices Notes
FROMFILE From database file Qualified object name Required, Positional 1
Qualifier 1: From database file Name
Qualifier 2: Library Name, *LIBL, *CURLIB
TOFILE To optical file Qualified object name Optional, Positional 2
Qualifier 1: To optical file Name, *FROMFILE
Qualifier 2: Library Name, *LIBL, *CURLIB
FROMMBR From database file member Name, *FIRST Optional, Positional 3
Top

From database file (FROMFILE)

Specifies the name of the database file from which records are copied (the source database file).

This is a required parameter.

Qualifier 1: From database file

name
Specify the name of the source database file.

Qualifier 2: Library

*LIBL
All libraries in the job's library list are searched until the first match is found.
*CURLIB
The current library for the job is where the file is located. If no library is specified as the current library for the job, QGPL is used.
name
Specify the name of the library where the source database file is located.
Top

To optical file (TOFILE)

Specifies the name of the optical file to which records are copied (the target optical file).

Qualifier 1: To optical file

*FROMFILE
The name of the target optical file is the same as the name of the source database file as specified on the FROMFILE parameter.
name
Specify the name of the target optical file.

Qualifier 2: Library

*LIBL
All libraries in the job's library list are searched until the first match is found.
*CURLIB
The current library for the job is where the file is located. If no library is specified as the current library for the job, QGPL is used.
name
Specify the name of the library where the target optical file is located.
Top

From database file member (FROMMBR)

Specifies the database member in the from-file that is being copied.

*FIRST
The first member in the database from-file is copied.
member-name
Specify the name of the database from-file member to copy.
Top

Examples

None
Top

Error messages

*ESCAPE Messages

RDR5415
Member &3 in File &1 in &2 not copied to Optical File &4 in &5.
Top