Thursday, October 1, 2026

𝗖𝗢𝗕𝗢𝗟 𝗕𝗟𝗞𝗦𝗜𝗭𝗘 𝗕𝗲𝗵𝗮𝘃𝗶𝗼𝘂𝗿: 𝗧𝗮𝗽𝗲 𝘃𝘀. 𝗗𝗶𝘀𝗸 𝗢𝘂𝘁𝗽𝘂𝘁

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. 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.