COBOL Manual for TNS/E Programs (H06.03+)
Environment Division
HP COBOL Manual for TNS/E Programs—520347-003
6-26
FILE-CONTROL Paragraph
In HP COBOL, entry-sequenced disk files can have alternate record keys, whose
values can identify individual records. A file-control entry for a sequential file includes
an ORGANIZATION SEQUENTIAL clause or no ORGANIZATION clause (in which
case the file has sequential organization by default).
SELECT clause
OPTIONAL
makes the file optional, which means that an OPEN statement with an INPUT,
I-O, or EXTEND phrase can open the file whether or not the file exists. If the
file exists, its I-O status code is “00”; if not, its I-O status code is “05”.
OPTIONAL does not affect the OPEN statement with an OUTPUT phrase.
When you open a nonexistent optional file for input, the first READ statement
for that file uses the AT END option (or USE procedure if the READ statement
has no AT END phrase).
file-name
is the COBOL file-name (the file-name in a file description entry).
.
SELECT clause ASSIGN clause
RESERVE clause
ORGANIZATION clause
PADDING CHARACTER clause
RECORD DELIMITER clause
ACCESS MODE clause
ALTERNATE RECORD KEY clause
FILE STATUS clause
VST037.vsd
SELECT
file-name
OPTIONAL
VST038.vsd










