11.01.2013 Views

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

ABCs of z/OS System Programming Volume 3 - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.4 IEBCOPY: Copy operation<br />

DATA.SET1<br />

Directory<br />

ABF<br />

Member F<br />

Before Copy<br />

Figure 4-5 IEBCOPY copy operation<br />

Copy control command example<br />

In Figure 4-5, two input partitioned data sets (DATA.SET5 and DATA.SET6) are copied to an<br />

existing output partitioned data set (DATA.SET1). In addition, all members on DATA.SET6 are<br />

copied; members on the output data set that have the same names as the copied members<br />

are replaced. After DATA.SET6 is processed, the output data set (DATA.SET1) is compressed<br />

in place. Figure 4-5 shows the input and output data sets before and after copy processing.<br />

The compress process is shown in Figure 4-7 on page 116. Figure 4-6 shows the job that is<br />

used to copy and compress partitioned data sets.<br />

//COPY JOB ...<br />

//JOBSTEP EXEC PGM=IEBCOPY<br />

//SYSPRINT DD SYSOUT=A<br />

//INOUT1 DD DSNAME=DATA.SET1,UNIT=disk,VOL=SER=111112,DISP=(OLD,KEEP)<br />

//IN5 DD DSNAME=DATA.SET5,UNIT=disk,VOL=SER=111114,DISP=OLD<br />

//IN6 DD DSNAME=DATA.SET6,UNIT=disk,VOL=SER=111115,<br />

// DISP=(OLD,KEEP)<br />

//SYSUT3 DD UNIT=SYSDA,SPACE=(TRK,(1))<br />

//SYSUT4 DD UNIT=SYSDA,SPACE=(TRK,(1))<br />

//SYSIN DD *<br />

COPY OUTDD=INOUT1,INDD=(IN5,(IN6,R),INOUT1)<br />

/*<br />

Figure 4-6 IEBOPY with copy and compress<br />

114 <strong>ABCs</strong> <strong>of</strong> z/<strong>OS</strong> <strong>System</strong> <strong>Programming</strong> <strong>Volume</strong> 3<br />

A<br />

Unused<br />

B<br />

Available<br />

DATA.SET5<br />

Directory<br />

AC<br />

Unsued<br />

Member C<br />

Unused<br />

A<br />

Available<br />

DATA.SET6<br />

Directory<br />

BCD<br />

Member B<br />

D<br />

C<br />

Available<br />

DATA.SET1<br />

Directory<br />

ABCDF<br />

Member F<br />

A<br />

Unused<br />

B<br />

D<br />

C<br />

After Copy<br />

Before Compress

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!