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, 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).
ASSIGN clause
associates file-name with system-file-name. Only the first system-file-name has
meaning. The compiler ignores subsequent names and issues a warning.
system-file-name
is the name of a code-180 file that the file system recognizes or one of the special operating
system file names described in System-Names (page 65). If system-file-name does
not begin with a dollar sign ($), backward slash (\), or number sign (#), then 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
makes the organization of the file line sequential.
ACCESS MODE clause
makes the access mode of the file sequential (the default).
126 Environment Division