COBOL Manual for TNS and TNS/R Programs

Disk Input and Output
HP COBOL Manual for TNS and TNS/R Programs522555-006
28-32
Structured Files
In the non-CRE environment, the value of number must be in the range 1 through 8
and is interpreted:
In the CRE, the value of number must be in the range 1 through 32 and is interpreted:
The BLOCK CONTAINS clause has no effect when a RESERVE clause is present—
the block size of the existing file is used.
Topics:
Cache Buffering
Sequential Block Buffering
HP COBOL Fast I-O
Cache Buffering
Cache buffering is a disk-process feature that speeds up the writing of structured disk
files. A cache, or buffer pool, is an area of system memory reserved for buffering
blocks of data for transfer to or from a disk.
If cache buffering is not used, each logical write operation causes the cache block
containing the record to be written immediately to the disk. This is called write-through
cache.
If cache buffering is used, the records are held in the cache (in system memory) and
not immediately written through to the disk. The blocks are written to disk only when
certain situations require it. This is called buffered cache.
Value of number Effect on Record Blocking
1 No buffering or HP COBOL Fast I-O
2 or greater HP COBOL Fast I-O if the assigned file qualifies; if not, sequential
block buffering for input and buffered cache for output if the assigned
file qualifies; otherwise, normal I-O. number is the number of blocks
to buffer
Value of number Effect on Record Blocking
1 No buffering or HP COBOL Fast I-O
2 Sequential block buffering on input and buffered cache on output if
the assigned file qualifies
3 or greater HP COBOL Fast I-O if the assigned file qualifies; if not, sequential
block buffering for input and buffered cache for output if the assigned
file qualifies; otherwise, normal I-O
number is the number of blocks to buffer