The BLOCK CONTAINS clause is syntax checked but has no effect on the
execution of the program.
- integer-1,
integer-2
- Must be nonzero unsigned integers. They specify:
- CHARACTERS
- Specifies the number of bytes required to store the physical record, no matter what
USAGE the data items have within the data record.
If only integer-2 is specified, it specifies the exact number of bytes in the physical
record. When integer-1 and integer-2 are both specified, they represent the minimum and maximum number of
bytes in the physical record, respectively.
integer-1 and integer-2 must include any control bytes and padding contained in the physical
record. (Logical records do not include padding.)
The CHARACTERS phrase is the default. CHARACTERS must be specified when:
- The physical record contains padding.
- Logical records are grouped so that an inaccurate physical record size could be
implied. For example, suppose you describe a variable-length record of 100 bytes, yet
each time you write a block of 4, one 50-byte record is written followed by three
100-byte records. If the RECORDS phrase were specified, the compiler would calculate the
block size as 420 bytes instead of the actual size, 370 bytes. (This calculation includes
block and record descriptors.)
- RECORDS
-
Specifies the number of logical records contained in each physical record.
The compiler assumes that the block size must provide for integer-2 records of maximum size, and provides any additional space needed
for control bytes.