Blocking for CMS Format Files
Here are some concepts you should know about blocking for CMS
format files under OS/MVS simulation:
- Using a blocked record format (FB, FBS, VB, VBS) reduces the amount
of CMS file system overhead associated with OS/MVS data management
requests by reducing the number of file system requests made by OS/MVS
simulation.
With blocking, OS/MVS simulation can read or write several CMS records at a time. The number of records read or written is the number of records in one OS/MVS block. However, each logical OS/MVS record is still recorded as a separate CMS record on the DASD device.
Without blocking, OS/MVS simulation must call the file system once for every record in the file.
- Under QSAM simulation, CMS does all of the blocking and deblocking for you, so the application does not have to worry about where records begin and end in its I/O buffers. For FB format files, QSAM simulation will only write a short block for the very last block in the file.
- Under BSAM and BPAM simulation, it is the application's responsibility to block and deblock records in the I/O buffers.
If you write a short block (by reducing the value of the DCBBLKSI
field in the DCB), all subsequent blocks will be written using the
shorter block size, even if you restore the original DCBBLKSI value
after the
short write
. Additionally, on input, CMS uses the LRECL and BLKSIZE information specified for the input file to perform any blocking. CMS has no way of knowing what block sizes were used to write the file to the device.