COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

SELECT clause
OPTIONAL
makes the file optional, which means that an OPEN statement with an INPUT 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).
file-name
is the COBOL file name (the file-name in a file description entry).
ASSIGN clause
associates file-name with system-file-name. Only the first system-file-name has
meaning. The compiler ignores subsequent names and literals and issues a warning.
system-file-name
is the name of a file as it is known to the file system. It must be enclosed in quotation marks
unless it forms a COBOL word. For more information about Guardian file names, see the
Guardian Procedure Calls Reference Manual. For more information about OSS file names,
see the filename(5) reference page either online or in the Open System Services System
Calls Reference Manual.
RESERVE clause
is ignored.
ORGANIZATION clause
Line Sequential Files 717