BLKSIZE

Synopsis

HELP:   Block size to read [AUTO]
TYPE:   NUMBER
SYNTAX: BLKSIZE=num

Description

The block size parameter defines the amount of data which is processed at a time. Conversion and formatting steps can result in a expansion or contraction of the internal block size.

A block can contain a bunch of records before and elements after formatting. It depends on the block size how many records/elements fit into one data block.

If this parameter is not specified (0), the default block size is determined from the system / catalog. On block I/O, this default has a minimum of 64 KiB or 4 records to ensure that all format detection algorithms get sufficient amounts of data.

If a block size is specified, these automatism are disabled. If you set a smaller block size, the internal memory utilization would be smaller, the CPU time for auto detection is smaller, but more CPU time is spent for the overhead used to handle the data units. Auto detection is only performed on the first block of data. If you define a small block size and use auto detection services, it is more likely that detection fails or yields incorrect results. A large block size results in better format detection and usually in a faster operation.

By default or if you define a block size greater than 64 KiB on record-oriented systems (MVS), the internal block size is greater than the valid block size range and at file allocation the optimal block size is used, because in this case we use a block size of 0 for dynamic allocation. If the internal block size within a valid range, we use the next possible block size. The 'FALLOC' object can be used to override the block size used for file allocation. The internal block size is only the default, if no block size for file allocation is defined.

Only if you use record I/O without any conversions which expand or shrink the data chunks, you can be sure that the block size used for reading is the same used for writing.