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


Example 4: Use Members and Input Records as Basis of Output Member

z/OS DFSMSdfp Utilities
SC23-6864-00

In this example, two partitioned members and input records from the input stream are used as the basis of a partitioned output member. Each block of 12 output records contains 10 modified records from an input partitioned member and two records from the input stream. Figure 1 shows the contents of the output partitioned member at the end of the job step.

Figure 1. Output Partitioned Member at Job Step Completion
Output Partitioned Member at Job Step Completion
  //MIX      JOB  ...
  //STEP1    EXEC PGM=IEBDG
  //SYSPRINT DD  SYSOUT=A
  //PARIN1   DD  DSNAME=INSET1(MEMBA),UNIT=disk,DISP=OLD,
  //             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS),
  //             VOLUME=SER=111111
  //PARIN2   DD  DSNAME=INSET2(MEMBA),UNIT=disk,DISP=OLD,
  //             DCB=(RECFM=FB,LRECL=80,BLKSIZE=960,DSORG=PS),
  //             VOLUME=SER=222222
  //PAROUT   DD  DSNAME=PARSET(MEMBA),UNIT=disk,DISP=(,KEEP),
  //             VOLUME=SER=333333,SPACE=(TRK,(10,10,5)),
  //             DCB=(RECFM=FB,LRECL=80,BLKSIZE=960,DSORG=PO)
  //SYSIN    DD  DATA
     DSD     OUTPUT=(PAROUT),INPUT=(PARIN1,PARIN2)
     FD      NAME=FIELD1,LENGTH=13,PICTURE=13,'DEPARTMENT 21'
     REPEAT  QUANTITY=10,CREATE=2
     CREATE  QUANTITY=10,INPUT=PARIN1,NAME=FIELD1
     CREATE  QUANTITY=2,INPUT=SYSIN
 
  (input records 1 through 20)
 
  $$$E
     REPEAT  QUANTITY=10,CREATE=2
     CREATE  QUANTITY=10,INPUT=PARIN2,NAME=FIELD1
     CREATE  QUANTITY=2,INPUT=SYSIN
 
  (input records 21 through 40)
 
  $$$E
     END
  /*
The control statements are as follows:
  • PARIN1 DD defines one of the input partitioned members.
  • PARIN 2 DD defines the second of the input partitioned members. (Note that the members are from different partitioned data sets.)
  • PAROUT DD defines the output partitioned member. This example assumes that the partitioned data set does not exist before the job step; that is, this DD statement allocates space for the partitioned data set.
  • SYSIN DD defines the control data set, which follows in the input stream.
  • DSD marks the beginning of a set of utility control statements and refers to the DD statements defining the input and output data sets.
  • FD creates a 13-byte field in which the picture "DEPARTMENT 21" is placed.
  • The first REPEAT statement indicates that the following group of two CREATE statements is to be repeated 10 times.
  • The first CREATE statement creates 10 output records. Each output record is constructed from an input record (from partitioned data set INSET1) and from previously defined FIELD1.
  • The second CREATE statement indicates that two records are to be constructed from input records included next in the input stream.
  • The $$$E record separates the input records from the REPEAT statement. The next REPEAT statement group is identical to the preceding group, except that records from a different partitioned member are used as input.
  • END signals the end of a set of utility control statements.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014