DCB Parameter
DCB Parameter Example
Scenario1 - Define a PS file with fixed-length record of 80 and a block size of 800 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=800)
Scenario2 - Define a PDS of length 80.
Code -
----+----1----+----2----+----3----+----4----+----5----+
//NEWPS DD DSN=MTH.DATA.PDS,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(3,2,2),RLSE),
// DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=800)
Scenario3 - Define a PS file with the DCB attributes of DD1 file from STEP01.
Code -
----+----1----+----2----+----3----+----4----+----5----+
//STEP01 EXEC PGM=PROG1
//DD1 DD DSN=MTH.DATA.PSFILE,DISP=SHR
//*
//STEP02 EXEC PGM=PROG2
//OUTPUT DD DSN=MTH.DATA.PSFILE2,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(3,2),RLSE),
// DCB=*.STEP01.DD1