COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

Table 122 Corresponding HP and HP COBOL Disk File Terms
HP COBOL TermHP Term
RelativeRelative
SequentialEntry-sequenced
IndexedKey-sequenced
The HP COBOL run-time routines that access structured disk files (entry-sequenced, relative, and
key-sequenced) do so with the help of the operating system routines that are collectively called the
Enscribe database record manager.
Table 123 Comparison of Structured File Characteristics
Type of Structured File
Key-Sequenced (Indexed)RelativeEntry-Sequenced (Sequential)Characteristic
Value of prime record keyRecord numberOrder in which they were
entered
Records ordered by ...
Prime or alternate record keyRecord number or alternate
record key
Record address or alternate
record key
Access is by ...
Maximum prime record key
length = 522 bytes
1
Maximum record number =
1,048,575
Maximum alternate record
key length = 253 bytes (249
if not unique)
Maximum alternate record
key length = 253 bytes (253
Maximum alternate-key
length = 253 bytes (249 if
not unique)
minus prime length if not
unique)
1
Depends on length specified
when record is written
Is specified when file is
created
Depends on length specified
when record is written
Space occupied by a record
...
Maximum logical record
length = 2,035 bytes
2
Maximum logical record
length = 4,072 bytes
Maximum logical record
length = 4,072 bytes
Yes, and space freed by
shortening a record can be
reused within its block
YesNoRecord can be shortened or
lengthened
Yes, and its space can be
reused within its block
Yes, and its space can be
reused
No, but its space can be
used for another record of
the same size
Record can be deleted
1
In H06.28/J06.17 RVUs with specific SPRs and later RVUs, the supported maximum prime record key length is 2,048
bytes, and the maximum alternate record length is 2,046 bytes (2,046 minus prime length if not unique) . 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 38).
2
In H06.28/J06.17 RVUs with specific SPRs and later RVUs, the supported maximum logical record length is 27,648
bytes. 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 38).
In HP COBOL, the DEPENDING phrase of the RECORD IS VARYING clause enables you to designate
a data item to receive the record length upon the successful completion of a READ statement and
to control the record length for a WRITE statement.
HP COBOL allows writing and reading zero-length records. To write a zero-length record, specify
RECORD IS VARYING FROM 0 TO ... DEPENDING ON data-name
and move the value zero into data-name before writing. After you read a file with the same
record description, data-name has the value zero. TMF writes zero-length records when it backs
out of transactions.
If an HP COBOL program describes fixed-length records, any zero-length records are discarded
when read. If an HP COBOL program describes variable-length records, upon return from the
READ statement, the entire record area is undefined. For this reason, you are advised to specify
862 Disk Input and Output