While testing
the same COBOL program, I observed different BLKSIZE behavior for tape
and disk output datasets.
The COBOL
program had the following settings:
- NOBLOCK0 compiler option was in effect.
- The FD definition did not contain BLOCK
CONTAINS 0.
Tape output
dataset
For a tape
output dataset, the system assigned a BLKSIZE equal to the LRECL,
regardless of whether BLKSIZE=0 was specified in the JCL.
In other words:
- With BLKSIZE=0 in JCL → BLKSIZE was assigned the same
value as LRECL.
- Without BLKSIZE=0 in JCL → BLKSIZE was still assigned
the same value as LRECL.
Disk output
dataset
The behavior
was different for a disk output dataset.
Regardless of whether BLKSIZE=0 was specified in the JCL, the system assigned an appropriate BLKSIZE as expected.
Fix for the
tape output dataset
To address the
tape dataset issue, I added the following clause to the COBOL FD:
BLOCK CONTAINS
0
After making
this change, the system properly assigned the BLKSIZE for the tape output
dataset as well, irrespective of whether BLKSIZE=0 was specified in the JCL.