JCL DCB Parameter

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-

  1. RECFM – Stands for Record format. Allowed values are – F/FB/V/VB/U
  2. LRECL – Logical Record Length.
  3. BLKSIZE – Define the Block Size
  4. DSORG – Data Set Organization
  5. BUFNO – Define the Buffer Number
  6. 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. 

For Example:

Sample Example of DCB Parameter

DCB Parameter in JCL

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.

For Example:
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

Improper value of BLKSIZE in JCL

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.


The JOB fails with an ERROR if DSORG is not multiple of LRECL

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.

Tutorials for all brains!