Previous Topic: Summary InformationNext Topic: Syntax


COPY

To copy data sets, use the COPY command. The data sets can be sequential, partitioned, or VSAM.

Use the COPY keywords to tailor the copy function to create one or more copies of the data needed in the format required. This includes the ability to exclude records from the copy by specifying selection criteria, or by modifying the output data through data manipulation keywords. COPY lets you change a record's variable length through the use of the CHANGE keyword.

Modify the default COPY report through various keywords. The options include the ability to format copied records using a copybook and the ability to print records in character, hex, or formatted mode.

To specify the ddname of the file to be copied, use the INFILE keyword, and the ddname of the output data set in the OUTFILE keyword. If you omit these keywords, the default for INFILE is SYSUT1. The default may have been changed by the &BAT_INFILE installation option.

The default for OUTFILE is the first seven characters of the ddname of the input file appended by the letter O. If the input file ddname contains less than seven characters, then the entire ddname is used.

Copying of load modules is not supported by the COPY command.

For a list of all the keywords the COPY command supports, see the topic Keywords in this section.