DCB parameter
A DD statement parameter that gives the attributes of a dataset, such as record format, record length and block size.
Also written DCB=, data control block, BLKSIZE=0
The DCB parameter describes the records in a dataset. DCB stands for data control block, the area a program uses when it reads or writes a file. A typical value is DCB=(RECFM=FB,LRECL=80,BLKSIZE=0): fixed blocked records, 80 bytes each, with the block size chosen by the system.
You mostly need it when creating a new dataset, so the system knows what the records will look like. For an existing dataset, the attributes are already recorded, and z/OS takes them from there.
The same attributes can be coded without the DCB= wrapper: RECFM=FB,LRECL=80 on the DD statement works the same way, and is common in newer JCL. They can also come from other places: a referback, such as DCB=*.STEP1.OUT, the LIKE parameter, an SMS data class, or the program itself.
BLKSIZE=0, or leaving the block size out, lets the system choose an efficient value for the device, which is nearly always the right choice. When a program fails because of a record length or format mismatch, compare the DCB values in the JCL with the program's file description.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- DD statementThe JCL statement that connects a name inside a program to a real dataset outside it.
- Record formatWhether the records in a dataset are all the same length or vary, and how they are blocked. Written as RECFM.
- Logical record lengthHow long each record in a dataset is, in characters, written as LRECL.
- Block sizeHow much data is moved between disk and memory in one go, written as BLKSIZE.
- ReferbackA way for a JCL statement to point back to a DD statement earlier in the job, instead of repeating its details.
- LIKE parameterA DD statement parameter that creates a new dataset with the same attributes as an existing one.