JCL DD DCB

JCL – DD BLKSIZE JCL – DD DEST

Advertisements


DCB parameter used to complete the dataset information.

DCB parameter constructed by file definition statements or language defined defaults.

DCB parameter used while creating the dataset through JCL.

DCB mainly used to specify the attributes of the dataset. i.e. record length, record format, organization type etc.,

DCB parameter is mandatory for creating new file/dataset from JCL.

DCB is an optional parameter.


Syntax:

[ DCB=(subparameter[,subparameter]...)                       ]
 
[ DCB= ( {dsname                        }[,subparameter]...) ]
[      ( {*.ddname                      }                  ) ]
[      ( {*.stepname.ddname             }                  ) ]
[      ( {*.stepname.procstepname.ddname}                  ) ]

The parenthesis can be ignored when specifying one keyword subparameter or only dataset name or only backward reference.

If multiple subparameter specifying, those should be separated by comma and enclosed by parenthesis.

The system gets the DCB information in the below sources in override order:


  • The processing program file definition statements
  • DD statement DCB parameter
  • Dataset label

Below are the lists of subparameters of DCB.


  • BFALN
  • BFTEK
  • BLKSIZE
  • BUFIN
  • BUFL
  • BUFMAX
  • BUFNO
  • BUFOFF
  • BUFOUT
  • BUFSIZE
  • CPRI
  • CYLOFL
  • DEN
  • DIAGNS
  • DSORG
  • EROPT
  • FUNC
  • GNCP
  • INTVL
  • IPLTXID
  • KEYLEN
  • LIMCT
  • LRECL
  • MODE
  • NCP
  • NTM
  • OPTCD
  • PCI
  • PRTSP
  • RECFM
  • RESERVE
  • RKP
  • STACK
  • THRESH
  • TRTCH

Example 1:

//DD1   DD    DSNAME=MTH.DATA.FILE,DISP=(NEW,KEEP),
//            DCB=(RECFM=FB,LRECL=425,BLKSIZE=18000),
//            SPACE=(50,10)

DD statement DD1 defines a new data set MTH.DATA.FILE. The DCB parameter contains the information necessary to complete the data control block.


Example 2:

//DD1   DD    DSNAME=MTH.DATA.FILE1,DISP=SHR
//DD2   DD    DSNAME=MTH.DATA.FILE2,DISP=(NEW,KEEP),
//            DCB=*.DD1,
//            SPACE=(50,10)

DD statement DD2 defines a new data set MTH.DATA.FILE2. The DCB parameter requests to copy the DCB parameters from MTH.DATA.FILE1 to MTH.DATA.FILE2 and create it.


Example 3:

//DD2   DD    DSNAME=MTH.DATA.FILE2,DISP=(NEW,KEEP),
//            DCB=*.STEP01.MTHPROC.DD1,
//            SPACE=(50,10)

DD statement DD2 defines a new data set MTH.DATA.FILE2. The DCB parameter requests to copy the DCB parameters from DD1 from STEP01 of MTHPROC to MTH.DATA.FILE2 and create it.


JCL – DD BLKSIZE JCL – DD DEST

Advertisements