Guardian Procedure Calls Reference Manual
The formulas for computing the maximum record length (MRL) based on data-blocklen are:
MRL equalsFor this type of file
data-blocklen - 24Relative and entry-sequenced
files
data-blocklen - 34Key-sequenced files
blocklen
input
INT:value
for structured files, specifies the length in bytes of each block of records in the file. In
H06.28/J06.17 RVUs with specific SPRs and later RVUs, the maximum block length for format
2 key-sequenced files is 32,768; for format 1 or 2 entry-sequenced and relative files, the
maximum block length is 4096. (For a list of the required H06.28/J06.17 SPRs, see SPR
Requirements for Increased Enscribe Limits for the H06.28/J06.17 Release (page 31).) For
earlier RVUs, the maximum block length is 4096, regardless of the file organization or format.
For a format 2 key-sequenced file, the value of blocklen must be at least recordlen + 34;
for format 1 or 2 entry-sequenced and relative files, the value of blocklen must be at least
recordlen + 24.
Regardless of the specified record length and data-block size, the maximum number of records
that can be stored in a format 2 data block is 16383; the maximum number of records that
can be stored in a format 1 data block is 511. For unstructured files on 512-byte sector disks,
a block length 4096 is used unconditionally, and the user has no control over the buffer size
used internally (as distinguished from 514-byte sector disks).
Data-block sizes are rounded up to power-of-two multiples of the sector size: 512, 1024, 2048,
4096, or 32,768. For example, if a 3K byte block were specified, the system would use 4096.
keylen
input
INT:value
for key-sequenced files, specifies the length, in bytes, of the record's primary-key field. In
H06.28/J06.17 RVUs with specific SPRs and later RVUs, the maximum key length for format
2 key-sequenced files is 2048. (For a list of the required H06.28/J06.17 SPRs, see SPR
Requirements for Increased Enscribe Limits for the H06.28/J06.17 Release (page 31).) For
earlier RVUs, the maximum key length is 255, regardless of whether it is a format 1 or format
2 file.
key-offset
input
INT:value
for key-sequenced files, specifies the number of bytes from the beginning of the record to where
the primary-key field starts. This attribute applies only to Enscribe files. In H06.28/J06.17 RVUs
with specific SPRs and later RVUs, the maximum key offset for format 2 key-sequenced files is
27,647. (For a list of the required H06.28/J06.17 SPRs, see SPR Requirements for Increased
Enscribe Limits for the H06.28/J06.17 Release (page 31).) For earlier RVUs, the maximum
key offset is 4039 for format 2 files and 4061 for format 1 files. For queue files, the key offset
must be 0.
Returned Value
INT
A file-system error code that indicates the outcome of the call.
388 Guardian Procedure Calls (F)