COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
description entry (with a level indicator of FD) or sort-merge file description entry (with a level
indicator of SD).
A file-control entry connects an operating system file name to a COBOL file name, specifies the
file’s organization and keys, and gives other information needed for input and output. For
information about Guardian file names, see the Guardian Procedure Calls Reference Manual. For
information about OSS file names, see Files in the OSS Environment (page 713).
Each file-control entry consists of a SELECT clause followed by one or more clauses that specify
file-related information. Every file-control entry must contain at least the SELECT clause and the
ASSIGN clause. The file organization determines which of the other clauses are required or optional.
No clause can appear more than once except for the ALTERNATE RECORD KEY clause, which
can appear as often as needed to describe the alternate record keys of the file. Code the SELECT
clause first, and then code the other clauses in any order.
Table 23 Summary of File-Control Entry Clauses
File Type
Sort-MergeQueueIndexedRelativeLine SequentialSequentialFile-Control Entry
Clause
1
RRRRRRSELECT
2
RRRRRRASSIGN
NAOOOOORESERVE
NARRROOORGANIZATION
NANANANANAOPADDING
CHARACTER
NANANANANAORECORD DELIMITER
NAOOOOOACCESS MODE
3
NARRNANANARECORD KEY
NANANAO if access
mode is
NANARELATIVE KEY
sequential, R
otherwise
NANAOONAOALTERNATE RECORD
KEY
NAOOOOOFILE STATUS
R=Required
O=Optional
NA=Not Applicable
1
File-control entry clauses have the same syntax for each file type, except as noted.
2
SELECT clause syntax is the same for all file types except sort-merge.
3
ACCESS MODE clause syntax is different for all types.
Table 24 Descriptions of File-Control Entry Clauses
DescriptionClause
Defines the file name used to refer to the file in the remainder of the source program.
The OPTIONAL phrase applies only to files opened in the INPUT, I-O, or EXTEND
SELECT
mode. When such a file is not required to be present every time the object program
unit is executed, you can designate it as optional.
Every file name in a SELECT clause must also be in a file description (FD) entry or
sort-merge file description (SD) entry in the Data Division. Conversely, every file name
116 Environment Division










