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


Example 7: Copy and Compare Partitioned Data Set in Two Job Steps

z/OS DFSMSdfp Utilities
SC23-6864-00

In this example, a partitioned data set is copied and compared in two job steps.
  //DISKDISK JOB  ...
  //STEPA    EXEC PGM=IEBCOPY
  //SYSPRINT DD  SYSOUT=A
  //SYSUT1   DD  DSNAME=MAINDB.LOG.OLDSET,DISP=SHR
  //SYSUT2   DD  DSNAME=NEWMEMS,UNIT=disk,DISP=(,PASS),
  //             VOLUME=SER=111113,SPACE=(TRK,(5,5,5)),
  //             DCB=(RECFM=FB,LRECL=80,BLKSIZE=640)
  //SYSUT3   DD  UNIT=SYSDA,SPACE=(TRK,(1))
  //SYSUT4   DD  UNIT=SYSDA,SPACE=(TRK,(1))
  //SYSIN    DD  *
         COPY OUTDD=SYSUT2,INDD=SYSUT1
         SELECT MEMBER=(A,B,D,E,F)
  /*
  //STEPB    EXEC PGM=IEBCOMPR
  //SYSPRINT DD  SYSOUT=A
  //SYSUT1   DD  DSNAME=OLDSET,DISP=(OLD,KEEP)
  //SYSUT2   DD  DSNAME=NEWMEMS,DISP=(OLD,KEEP)
  //SYSIN    DD  *
         COMPARE TYPORG=PO
         EXITS ERROR=SEEERROR
  /*

The first job step copies the data set and passes the original and copied data sets to the second job step. The second job step compares the two data sets.

The control statements for the IEBCOMPR job step are discussed, as follows:
  • SYSUT1 DD defines a blocked input data set (MAINDB.LOG.OLDSET) that is passed from the preceding job step. The data set resides on a disk or tape volume.
  • SYSUT2 DD defines a blocked input data set (MAINDB.LOG.NEWMEMS) that is passed from the preceding job step. The data set resides on a disk volume.
  • SYSIN DD defines the control data set, which follows in the input stream.
  • COMPARE TYPORG=PO specifies partitioned organization.
  • EXITS specifies that a user error routine, SEEERROR, is to be used.

Because the input data set names are not identical, the data sets can be retrieved by their data set names.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014