JCL DCB Parameter
DCB is an optional keyword parameter which is used to tell the information about dataset in the data control block in MVS operating system data control block is a description of a dataset in a program.
//ddname DD DCB=<List of parameters>
The important sub of parameters which are defined in this list of parameters are-
- RECFM – Stands for Record format. Allowed values are – F/FB/V/VB/U
- LRECL – Logical Record Length.
- BLKSIZE – Define the Block Size
- DSORG – Data Set Organization
- BUFNO – Define the Buffer Number
- BUFSIZE – Define the Buffer Size
What is RECFM?
Record format defines the record format of that dataset and it has following values
- F – This is used for fixed length records.
- FB – This is used for fixed blocks.
- V – V is variable length records.
- VB – This is used as variable length block
- U – U which is an undefined format
What is LRECL?
LRECL is a Logical Record Length of the dataset.
What is BLKSIZE?
This stands for Block Size. The block size is also called as physical record length of the block.
which has to be stored in the data set.
What is DSORG?
DSORG is also called as Dataset Organization. This is used to tell whether the type of Dataset is a PDS or PS or a library.
What is BUFNO?
BUFNO is used to define the buffer number.
What is BUFSIZE?
BUFSIZE is used to define the Buffer Size.
Apart from these, we have some other sub parameters.
BUFIN ,BUFMAX, BUFOF, BUFSIZE etc.
Sample Example of DCB Parameter
Here, you can see that we gave DSORG=PS which means that the dataset organization is PS.
If we just give here DSORG = PO that means it is a PDS. FB that is fixed block. LRECL is 80 that is logical record length is 80 and block size is 800.
Make sure that when we choose Record Format as Fixed Block, then the LRECL and Block Size should have correct value and Block Size should be multiples of an LRECL in most of the cases.
If LRECL=80 then choose a value of BLKSIZE as 80 or 160 or 320 or 800 or 1600 etc
Example of an Improper value of DCB Parameter
In this example, we have used wrong a value of BLKSIZE in our DCB Parameter. The value of LRECL is 80 while the value in BLKSIZE is 801 which is not a multiple of 80. Due to this, the JOB will throw an error.
We can see that the output file is created but there are no records present and this is because of the improper values coded in the DCB Parameter.