COBOL Manual for TNS and TNS/R Programs
Environment Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
6-51
FILE-CONTROL Paragraph
alt-key
is an alphanumeric or unsigned numeric data item declared in the record
description entry of the file and is used to gain access to records within the file.
The alt-key size and location must agree with the size and location of the
alternate key within the file, as defined when the alternate key file was
established by the operating system File Utility Program (FUP). (For
information about FUP, see the File Utility Program (FUP) Reference Manual.)
DUPLICATES
means that alternate key values are not necessarily unique.
FILE STATUS clause
defines filestat as the file-status data item for the file. When a COBOL run-
time I-O routine completes an operation on the file, it stores the status code in
filestat before returning control to your program (see I-O Status Code).
filestat
is a 2-character alphanumeric, nonnational data item defined in the Working-
Storage Section, Extended-Storage Section, or Linkage Section.
Usage Considerations:
•
Record Key
The data description entry for reckey cannot contain an OCCURS clause.
•
Alternate Record Keys
The records within the file can be accessed in ascending order of the alt-key
value. The order in which records are obtained using alt-key can differ from the
order obtained using reckey. You can define up to 31 alternate keys for a file.
If you include the DUPLICATES phrase in the ALTERNATE RECORD KEY clause,
the value of alt-key need not be unique for each record in the file. Depending
on the INSERTIONORDER parameter of the alternate key file, records with
duplicate alternate key values are inserted (or retrieved) in either prime key order
or in the order in which they were inserted in the file.
The data description entry for alt-key cannot contain an OCCURS clause or be
subordinate to an entry that contains an OCCURS clause. The leftmost character
position of an alt-key item cannot correspond to the leftmost character position
of the reckey item or another alt-key item in that file.
STATUS
ISFILE
filestat
VST046.vsd