Previous Topic: ALTER Statement (Physical Sequential)

Next Topic: DELETE Statement


COPY Statement

The COPY statement copies an entire VSAM or Physical Sequential entry.

COPY    {DSNAME=datasetname,DATA=newdatacomponentname|PSDSN=datasetname}
,NEWNAME=newdatasetname
DSNAME=datasetname

Specifies the name of a VSAM entry to COPY to the new entry. The value should be a valid cluster name, not a data component name or physical sequential data set name. DSNAME= must be accompanied by DATA=, which specifies the DATA component name of the new entry.

DATA=newdatacomponentname

Specifies the data component of the new VSAM cluster entry specified by NEWNAME. This parameter is required when the DSNAME parameter is specified.

PSDSNAME=datasetname

Specifies the name of a Physical Sequential data set entry to COPY. DATA= should not be coded with PSDSNAME=. If DATA= is present, the CFMU ignores it and issues a warning message.

NEWNAME=newdatasetname

Specifies the new data set name entry to be created from the DSNAME or PDSNAME entry specified. For DSNAME, DATA specifies the new data component name.