Recommendation for DCB= parameters of JCL
It is strongly recommended that you take advantage of features of DFSMS and COBOL that let the system determine the block size. (In general, you should not specify DCB= attributes except in the few cases mentioned in the Enterprise COBOL for z/OS® Programming Guide.
These are the recommendations:
- For new files, let z/OS determine
the block size. To take advantage of system-determined block size:
- Code BLOCK CONTAINS 0 in your source program or use the BLOCK0 compiler option.
- Do not code RECORD CONTAINS 0 in your source program.
- Do not code a BLKSIZE value in the JCL DD statement.
- For existing blocked data sets, use the existing file block size:
- Code BLOCK CONTAINS 0 in your source program or use the BLOCK0 compiler option.
- Do not code a BLKSIZE value in the ddname definition.
The one case where you might consider putting BLKSIZE in the JCL is if you require a specific block size for a new file and you need the flexibility to modify that block size without recompiling your program. In this case, follow these guidelines:
- Code BLOCK CONTAINS 0 in your source program or use the BLOCK0 compiler option.
- Code a BLKSIZE value in the ddname definition (DCB=(BLKSIZE=xxx) in the JCL DD statement).