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


Example 6: Construct Records with Your Own Patterns

z/OS DFSMSdfp Utilities
SC23-6864-00

In this example, 10 fields containing user-supplied character patterns are used in the construction of output records. After a record is written, each field is rolled or waved, as specified in the applicable FD statement. Figure 1 shows the contents of the output records at the end of the job step.

Figure 1. Contents of Output Records at Job Step Completion
Contents of Output Records at Job Step Completion
                                                                         72
  //ROLLWAVE JOB  ...
  //STEP1    EXEC PGM=IEBDG
  //SYSPRINT DD  SYSOUT=A
  //OUTSET   DD  DSNAME=SEQSET,UNIT=disk,DISP=(,KEEP),
  //             VOLUME=SER=SAMP,SPACE=(TRK,(10,10)),
  //             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
  //SYSIN    DD  *
   DSD    OUTPUT=(OUTSET)
   FD     NAME=FIELD1,LENGTH=8,PICTURE=8,'   AAAAA',ACTION=RO
   FD     NAME=FIELD2,LENGTH=8,PICTURE=8,'BBBBB   ',ACTION=RO
   FD     NAME=FIELD3,LENGTH=8,PICTURE=8,'A   AA  ',ACTION=RO
   FD     NAME=FIELD4,LENGTH=8,PICTURE=8,' BB    B',ACTION=RO
   FD     NAME=FIELD5,LENGTH=8,PICTURE=8,'   AAA  ',ACTION=RO
   FD     NAME=FIELD6,LENGTH=8,PICTURE=8,'   CCCCC',ACTION=WV
   FD     NAME=FIELD7,LENGTH=8,PICTURE=8,'  DDDD  ',ACTION=WV
   FD     NAME=FIELD8,LENGTH=8,PICTURE=8,'  C  CC ',ACTION=WV
   FD     NAME=FIELD9,LENGTH=8,PICTURE=8,'  DD   D',ACTION=WV
   FD     NAME=FIELD10,LENGTH=8,PICTURE=8,'  CCC   ',ACTION=WV
   CREATE QUANTITY=300,NAME=(FIELD1,FIELD2,FIELD3,                       X
            FIELD4,FIELD5,FIELD6,FIELD7,FIELD8,FIELD9,FIELD10)
   END
  /*
The control statements are as follows:
  • OUTSET DD defines the output sequential data set on a disk volume. Ten tracks of primary space and 10 tracks of secondary space are allocated to the data set.
  • SYSIN DD defines the control data set that follows in the input stream.
  • DSD marks the beginning of a set of utility control statements and refers to the DD statement defining the output data set.
  • FD defines a field to be used in the subsequent construction of output records. The direction and frequency of the initial roll or wave depend on the location of data in the field.
  • CREATE constructs 300 records from the contents of the previously defined fields.
  • 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