z/OS DFSMSdfp Utilities
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example 4: Unload and Compress a Data Set

z/OS DFSMSdfp Utilities
SC23-6864-00

In this example, a partitioned data set is unloaded to a tape volume to create a backup copy of the data set. If this step is successful, the partitioned data set is to be compressed in place.
  //SAVE     JOB  ...
  //STEP1    EXEC PGM=IEBCOPY
  //SYSPRINT DD  SYSOUT=A
  //SYSUT1   DD  DSNAME=PARTPDS,UNIT=disk,VOL=SER=PCP001,
  //             DISP=OLD
  //SYSUT2   DD  DSNAME=SAVDATA,UNIT=tape,VOL=SER=TAPE03,
  //             DISP=(NEW,KEEP),LABEL=(,SL)
  //SYSUT3   DD  DSNAME=TEMP1,UNIT=disk,VOL=SER=111111,
  //             DISP=(NEW,DELETE),SPACE=(80,(60,45))
  //SYSIN    DD  DUMMY
  //STEP2    EXEC PGM=IEBCOPY,COND=(0,NE),PARM='SIZE=500K'
  //SYSPRINT DD  SYSOUT=A
  //COMPDS   DD  DSNAME=PARTPDS,UNIT=disk,DISP=OLD,
  //             VOL=SER=PCP001
  //SYSUT3   DD  DSNAME=TEMPA,UNIT=disk,VOL=SER=111111,
  //             DISP=(NEW,DELETE),SPACE=(80,(60,45))
  //SYSIN    DD  *
             COPY OUTDD=COMPDS,INDD=COMPDS
  /*
The control statements are discussed below:
  • SYSUT1 DD defines a partitioned data set (PARTPDS) that resides on a disk volume and is assumed to have 700 members. The number of members is used to calculate the space allocation on SYSUT3.
  • SYSUT2 DD defines a sequential data set to hold PARTPDS in unloaded form. Block size information can optionally be added; this data set must be NEW.
  • SYSUT3 DD defines the temporary spill data set. The SYSUT4 data set is never used for an unload operation.
  • SYSIN DD defines the control data set. Because SYSIN is dummied and SYSUT2 defines a sequential data set, all members of the SYSUT1 data set will be unloaded to the SYSUT2 data set.
  • The second EXEC statement marks the beginning of the compress-in-place operation. The SIZE parameter indicates that the buffers are to be as large as possible. The COND parameter indicates that the compress-in-place is to be performed only if the unload operation was successful.
  • COMPDS DD defines a partitioned data set (PARTPDS) that contains 700 members and resides on a disk volume.
  • SYSUT3 DD defines the temporary spill data set to be used if there is not enough space in main storage for the input data set's directory entries. TEMPA contains one 80-character record for each member.
  • SYSIN DD defines the control data set, which follows in the input stream. The data set contains a COPY statement.
  • COPY marks the beginning of the copy operation. Because the same DD statement is specified for both the INDD and OUTDD operands, the data set is compressed in place. If a PDSE is being used, this step will not be processed.

If you want to unload more than one data set in a single use of IEBCOPY, you must use a separate COPY statement for each unload operation. Only one input data set may be specified in an unload operation.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014