The DCB (Data Control Block) parameter specifies the physical characteristics of a data set, including record format, record length, block size, and organization. These attributes are essential for the operating system to correctly process and access the data.
1//ddname DD DCB=(subparameter,subparameter,...)
1//ddname DD DCB=(RECFM=format,LRECL=length,BLKSIZE=size,DSORG=organization)
Value | Description |
---|---|
F | Fixed-length records |
FB | Fixed-length, blocked records |
FBA | Fixed-length, blocked with ANSI control characters |
FBM | Fixed-length, blocked with machine code control characters |
V | Variable-length records |
VB | Variable-length, blocked records |
VBA | Variable-length, blocked with ANSI control characters |
U | Undefined-length records |
Specifies the length, in bytes, of each logical record in the data set.
Common values: 80 (card images), 132 or 133 (print lines)
Specifies the length, in bytes, of each physical block in the data set.
Tip: For disk data sets, you can specify BLKSIZE=0 to let the system determine an optimal block size.
Value | Description |
---|---|
PS | Physical Sequential - records stored one after another |
PO | Partitioned Organization - a library with members (like source code libraries) |
DA | Direct Access - records accessed by relative block address |
VS | VSAM - Virtual Storage Access Method organization |
Subparameter | Description |
---|---|
BUFNO | Number of buffers to be allocated |
KEYLEN | Length of keys for indexed or direct data sets |
DEN | Tape density |
OPTCD | Optional services codes |
TRTCH | Tape recording technique |
123//OUTDD DD DSN=USER.FIXED.DATA,DISP=(NEW,CATLG,DELETE), // SPACE=(TRK,(10,5)),UNIT=SYSDA, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000,DSORG=PS)
Creates a new data set with fixed-length blocked records, 80-byte logical records, 8000-byte blocks
123//VARDD DD DSN=USER.VARIABLE.DATA,DISP=(NEW,CATLG,DELETE), // SPACE=(TRK,(15,5)),UNIT=SYSDA, // DCB=(RECFM=VB,LRECL=256,BLKSIZE=6144,DSORG=PS)
Creates a new data set with variable-length blocked records, maximum record length of 256 bytes
123//LIBDD DD DSN=USER.SOURCE.LIB,DISP=(NEW,CATLG,DELETE), // SPACE=(TRK,(50,20,10)),UNIT=SYSDA, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=6160,DSORG=PO)
Creates a new partitioned data set (library) with directory blocks for members
12//PRTDD DD SYSOUT=A, // DCB=(RECFM=FBA,LRECL=133,BLKSIZE=6650)
Defines a print file with ANSI carriage control characters (the 'A' in FBA)
123//OPTDD DD DSN=USER.OPTIMAL.DATA,DISP=(NEW,CATLG,DELETE), // SPACE=(TRK,(10,5)),UNIT=SYSDA, // DCB=(RECFM=FB,LRECL=100,BLKSIZE=0,DSORG=PS)
Creates a new data set letting the system determine the optimal block size (BLKSIZE=0)
123//REFDD DD DSN=USER.NEW.DATA,DISP=(NEW,CATLG,DELETE), // SPACE=(TRK,(10,5)),UNIT=SYSDA, // DCB=*.STEP1.OLDDD
Creates a new data set with DCB attributes copied from OLDDD in STEP1
123//MODDD DD DSN=USER.LIKE.DATA,DISP=(NEW,CATLG,DELETE), // SPACE=(TRK,(10,5)),UNIT=SYSDA, // DCB=(MODEL.DATA.SET,RECFM=VB)
Creates a new data set with DCB attributes from MODEL.DATA.SET, but overrides RECFM to VB