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


Example 5: Create New Master Data Set and Delete Selected Records

z/OS DFSMSdfp Utilities
SC23-6864-00

In this example, a new master sequential data set is created from partitioned input and selected logical records are deleted.
  //UPDATE   JOB  ...
  //STEP1    EXEC PGM=IEBUPDTE,PARM=MOD
  //SYSPRINT DD  SYSOUT=A
  //SYSUT1   DD  DSNAME=DCB.PARTDS,DISP=(OLD,KEEP)
  //             VOLUME=SER=111112
  //SYSUT2   DD  DSNAME=SEQDS,UNIT=tape,LABEL=(2,SL),
  //             DISP=(,KEEP),VOLUME=SER=001234,
  //             DCB=(RECFM=FB,LRECL=80,BLKSIZE=2000)
  //SYSIN    DD  *
  ./     CHANGE   NEW=PS,NAME=OLDMEMB1
 
  (Data statement 1, sequence number 00000123)
 
  ./     DELETE   SEQ1=223,SEQ2=246
 
  (Data statement 2, sequence number 00000224)
 
  /*
The control statements are as follows:
  • SYSUT1 DD defines the input partitioned data set DCB.PARTDS, which resides on a disk volume.
  • SYSUT2 DD defines the output sequential data set, SEQDS. The data set is written as the second data set on a tape volume.
  • SYSIN DD defines the control data set, which follows in the input stream.
  • CHANGE identifies the input member (OLDMEMB1) and indicates that the output is a sequential data set (NEW=PS).
  • The first data statement replaces the logical record whose sequence number is identical to the sequence number in the data statement (00000123). If no such logical record exists, the data statement is incorporated in the proper sequence within the output data set.
  • The DELETE detail statement deletes logical records having sequence numbers from 223 through 246, inclusive.
  • The second data statement is inserted in the proper sequence in the output data set, because no logical record with the sequence number 224 exists (it was deleted in the previous statement).

Note that only one member can be used as input when converting to sequential organization.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014