In this example, a partitioned data set (DATASET5) is copied from
one disk volume to another.
Figure 1 shows the input and
output data sets before and after processing.
//COPY JOB ...
//JOBSTEP EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD DSNAME=DATASET5,UNIT=disk,VOL=SER=111113,
// DISP=SHR
//SYSUT2 DD DSNAME=DATASET4,UNIT=disk,VOL=SER=111112,
// DISP=(NEW,KEEP),SPACE=(TRK,(5,1,2))
The control statements are discussed below:
- SYSUT1 DD defines a partitioned data set, DATASET5, that contains
two members (A and C).
- SYSUT2 DD defines a new partitioned data set, DATASET4, that is
to be kept after the copy operation. Five tracks are allocated for
the data set; two blocks are allocated for directory entries.
- Because the partitioned data set has only two members, SYSUT3
and SYSUT4 DD are not needed.
- Because the input and output data sets are identified as SYSUT1
and SYSUT2, the SYSIN data set is not needed. The SYSUT1 data set
will be copied in full to the SYSUT2 data set. After the copy operation
is finished, DATASET4 will contain the same members that are in DATASET5.
However, there will be no embedded, unused space in DATASET4. If you
are copying a PDSE, the processing is the same, except that there
is no embedded, unused space in a PDSE.
Figure 1. Copying a Partitioned
Data Set—Full Copy