JCL Temporary Datasets Example


Scenario1 - Defining an temporary PS file with LRECL of 500 bytes

Code -

----+----1----+----2----+----3----+----4----+----5----+
//NEWPS    DD DSN=&&TEMPPS,
//            DISP=(NEW,PASS,),
//            UNIT=SYSDA,
//            SPACE=(TRK,(3,2),RLSE),
//            DCB=(DSORD=PS,RECFM=FB,LRECL=500,BLKSIZE=5000)

Scenario2 - Defining a temporary PDS member with LRECL of 80 bytes

Code -

----+----1----+----2----+----3----+----4----+----5----+
//NEWPS    DD DSN=&&TEMPPDS(MEMBER),
//            DISP=(NEW,PASS,),
//            UNIT=SYSDA,
//            SPACE=(TRK,(3,2,2),RLSE),
//            DCB=(DSORD=PO,RECFM=FB,LRECL=80,BLKSIZE=800)