Creating Empty Dataset Example


Scenario - Creates an empty PS dataset with a fixed block format and logical record length of 80 characters..

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MATEPKC  JOB (123),'MTH',CLASS=A,MSGCLASS=A,
//             MSGLEVEL=(1,1),NOTIFY=&SYSUID 
//*****************************************************
//* CREATE A EMPTY FILE 
//*****************************************************
//STEP10   EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DUMMY
//SYSUT2   DD DSN=MATEPK.IEBGENER.BACKUPPS,
//            DISP=(NEW,CATLG,DELETE),
//            SPACE=(TRK,(10,10),RLSE),
//            UNIT=3390,VOL=SER=DEVHD4,
//            DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)
//SYSIN    DD  DUMMY

Explaining Example -

  • SYSUT1 DD specifies the input data set as DUMMY.
  • SYSUT2 DD defines the output flat file (MATEPK.IEBGENER.BACKUPPS).
  • SYSIN DD defines the control card as DUMMY to specify no control statements are using.