COBOL Manual for TNS and TNS/R Programs
Using HP COBOL in the OSS Environment
HP COBOL Manual for TNS and TNS/R Programs—522555-006
19-12
File-Control Entries
These topics explain these items with respect to line sequential files:
•
File-Control Entries
•
File Description Entries
•
I-O-CONTROL Paragraph
•
OPEN Statement
•
READ Statement
•
REWRITE Statement
•
WRITE Statement
File-Control Entries
The syntax for a file-control entry for a line sequential file is:
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 regardless of whether 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 calls the AT END option (or USE procedure if the READ statement
has no AT END phrase).
.
SELECT clause ASSIGN clause
RESERVE clause
ORGANIZATION clause
ACCESS MODE clause
FILE STATUS clause
VST624.vsd
.
FILE-CONTROL
file-control-entry
VST036.vsd