RECFM Parameter Example


Scenario1 - Define a PS file with fixed-length records (80 bytes).

Code -

----+----1----+----2----+----3----+----4----+----5----+
//NEWPS  DD DSN=MTH.DATA.PSFILE,
//          DISP=(NEW,CATLG,DELETE),
//          UNIT=SYSDA,
//          SPACE=(TRK,(3,2),RLSE),
//          DCB=(DSORG=PS,RECFM=F,LRECL=80,BLKSIZE=1600)

Scenario2 - Define a PS file with variable-length records (160 bytes).

Code -

----+----1----+----2----+----3----+----4----+----5----+
//NEWPS  DD DSN=MTH.DATA.PSFILE,
//          DISP=(NEW,CATLG,DELETE),
//          UNIT=SYSDA,
//          SPACE=(TRK,(3,2),RLSE),
//          DCB=(DSORG=PS,RECFM=V,LRECL=160,BLKSIZE=1600)

Scenario3 - Define a PS file with fixed-length blocked records (80 bytes).

Code -

----+----1----+----2----+----3----+----4----+----5----+
//NEWPS  DD DSN=MTH.DATA.PSFILE,
//          DISP=(NEW,CATLG,DELETE),
//          UNIT=SYSDA,
//          SPACE=(TRK,(3,2),RLSE),
//          DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=1600)

Scenario4 - Define a PS file with unblocked records.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//NEWPS  DD DSN=MTH.DATA.PSFILE,
//          DISP=(NEW,CATLG,DELETE),
//          UNIT=SYSDA,
//          SPACE=(TRK,(3,2),RLSE),
//          DCB=(DSORG=PS,RECFM=U)