To copy a data set into a file and use data definition names (ddnames)
instead of a data set name and path name, use the OCOPY command.
- If the data set and file are not yet allocated, allocate them
and specify ddnames, using either the ALLOCATE command or the DD statement
in JCL.
The
ALLOCATE command has these operands for allocating a
z/OS UNIX file:
PATH
PATHDISP
PATHMODE
PATHOPTS
They are explained in
z/OS TSO/E Command Reference.
- Enter the OCOPY command, making sure that the ddnames used match
the ddnames that were specified when the data set and file were allocated.
- You can use the CONVERT option for single-byte data, but not for
double-byte data. See Double-byte data for
information about code page conversion for double-byte data.
- If you are moving the data set or partitioned data set member permanently
to the file system: After the copy is completed, delete the original
using the TSO/E DELETE command.