COBOL Manual for TNS/E Programs (H06.03+)
Environment Division
HP COBOL Manual for TNS/E Programs—520347-003
6-48
FILE-CONTROL Paragraph
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.
The file-control entry can contain at most one ALTERNATE RECORD KEY clause
that describes a particular alternate record key of the file.
If a file in the file system is defined as having alternate record keys to which the
COBOL program does not make any reference, you do not need to specify them in
the File-Control paragraph.
•
Sequential Block Buffering
Sequential block buffering, enabled by the RESERVE clause when the file is open
in INPUT or I-O mode, is discussed under File-Control Entries for Sequential Files.
STATUS
ISFILE
filestat
VST046.vsd










