COBOL Manual for TNS and TNS/R Programs
Data Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
7-15
File Description Entries
BLOCK CONTAINS Clause
Use the optional BLOCK CONTAINS clause to specify the number of logical records or
the number of character positions in a physical record on tape or unstructured disk files
only. For these types of files, if this clause is absent, the compiler assigns a block size
of one logical record. The operating system handles all other file blocking and
deblocking in a way that is transparent to the COBOL program.
blk-1
is an unsigned integer literal that specifies the minimum size of a block.
blk-2
is an unsigned integer literal. In the presence of blk-1, blk-2 is the fixed size of
a block; otherwise, it is the maximum size of a block.
RECORDS
specifies that the values of blk-1 and blk-2 represent numbers of logical
records.
CHARACTERS
specifies that the values of blk-1 and blk-2 represent numbers of character
positions. This is the default.
Usage Considerations:
•
Limits
The minimum number of character positions you can specify is equal to the
maximum record size of the file. If you specify more than 32,767 character
positions, the compiler reports an error.
If you specify a number of records greater than 32,767 divided by the maximum
record size for the file, the compiler reports an error.
blk-1
CONTAINS
BLOCK
RECORDS
TO
blk-2
CHARACTERS
VST077.vsd