COBOL Manual for TNS and TNS/R Programs
Environment Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
6-38
FILE-CONTROL Paragraph
File-Control Entries for Line Sequential Files
Line sequential files are available only in the OSS environment.
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).
.
RESERVE clause
ORGANIZATION clause
ACCESS MODE clause
FILE STATUS clause
SELECT clause
ASSIGN clause
VST624.vsd
SELECT
file-name
OPTIONAL
VST038.vsd