Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

Module 4: JCL DD Statement


DD DCB Parameter

DCB stands for Data Control Block. DCB parameter is used to supply information to the system that allows it to manage the data set that are created as job submitted. For example it is used to instruct system about records format (fixed/variable), record length, block size etc.

Syntax:-

DCB=(RECFM=format,LRECL=record-length,BLKSIZE=block-size)

Where,

RECFM:- It specifies record format of dataset. It can be Fixed, Variable, Undefined, Fixed Blocked, Variable Blocked. (F,V,U,FB,VB)

LRECL:- It specified the logical record length. The length of the record is as in the program for fixed length records and the length of the longest record with four more bytes for variable length records

BLKSIZE:- It defines physical record length. The length of the record in actual storage volume. One block contains one or more logical records. It is suggested to code BLKSIZE to 0 so that the best size is chosen by the system based on the device used for storing dataset. If we code it explicitly then make sure it must be multiple of LRECL for FB dataset and must not be less than longest records with eight more bytes for VB dataset. In extra eight bytes, four bytes are used for length of record and four bytes are used for length of the block

Example:-

//JOB1 JOB A123,’STEVE’ //STEP1 EXEC PGM=PROGRAM1 //DATA1 DD DSN=DEPT1.EMP1.DATA,UNIT=3390, // DCB=(RECFM=FB,LRECL=120,BLKSIZE=1200)

In this example, the DCB parameter specifies that, this file is having fixed block record format having logical record length of 120 bytes and block will be 1200 (1200 is multiple of 120)






© copyright mainframebug.com
Privacy Policy