Creating Empty Dataset


IEBGENER can also be used to create an empty dataset. This is relatively uncommon, but creating an empty dataset with specific attributes (like record format, logical record length, and block size) can be helpful without copying any data.

Creating an empty dataset using IEBGENER involves specifying an empty input dataset to prevent copying records. We can control this by using a DUMMY dataset as the input. This allows you to create a new dataset (PS or PDS) without any data.

Practical Example -


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

JCL -

----+----1----+----2----+----3----+----4----+----5----+
...
//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
...