The file control entry names a file and can specify other file-related information.
Although they are a part of the standard COBOL definition, the RECORD DELIMITER and RESERVE phrases and ellipses in the ASSIGN
clause are explicitly excluded from the X/Open COBOL language definitions and should not be used in a conforming X/Open COBOL
source program.
General Formats for Format 1 (Record Sequential Files)


General Formats for Format 2 (Line Sequential Files)
General Formats for Format 3 (Relative Files)
General Formats for Format 4 (Indexed Files)
General Formats for Format 5 (Sort-Merge Files)
Directives
- In addition to Compiler directives which provide flagging and modify the reserved word list, the following directives may
impact either the syntax or the semantics described in this section.
- ASSIGN - determines how the literal, data-name, or external-file-reference is evaluated.
- SEQUENTIAL - determines whether files defined as ORGANIZATION IS SEQUENTIAL are considered LINE SEQUENTIAL or RECORD SEQUENTIAL.
Syntax Rules for All Formats (All Files)
- The
SELECT clause must be specified first in the file control entry. The clauses which follow the SELECT clause can appear in any order.
- Each file described in the Data Division must be named once, and only once, as file-name in the File-Control paragraph. Each
file specified in the file control entry must have a file description entry in the Data Division of the same factory, method,
object, function or program.
- If the ACCESS MODE clause is not specified, the ACCESS MODE IS SEQUENTIAL clause is implied.
Data-name-1 can be declared in the Data Division as an alphanumeric or group data item long enough to hold the external name
of the file. If it is not explicitly declared within the source element, your COBOL system declares it implicitly as an alphanumeric
data item long enough to hold the maximum permissible size of file-name. If data-name-1 occurs in the FROM phrase, the data
item must be explicitly declared in the Data Division.
The NOT OPTIONAL phrase has effect only when the file is opened input-output.
External-file-reference, data-name-1, or literal-1 specifies the external name of the file. If the EXTERNAL or DYNAMIC option
is used, literal-1 must not be specified. If the DYNAMIC option is used, the word specified for the external file-name is
interpreted as external-file-reference.
- Data-name-2 must be defined in the Data Division as a two-character, alphanumeric data item


or a two-character numeric data item with USAGE DISPLAY
and must not be defined in the File Section
or Local-Storage Section
of the Data Division.
Data-name-3 must be defined as a group item of 6 bytes in the Working-Storage or Linkage Section of the Data Division.

Data-name-4 must be defined in the Working-Storage Section as an alphanumeric data item.
- All data-names can be qualified.
Syntax Rules for Format 1 (Record Sequential Files only)
Literal-2 must be a one-character nonnumeric literal.
Data-name-5 can be qualified. It must be defined in the Data Division as a one-character data item of category alphanumeric.
It cannot be defined in the File or Report Sections of the Data Division.

Syntax Rules for Formats 1 and 2 (Record and Line Sequential Files)
- When the ORGANIZATION clause is not specified, sequential organization is assumed.
KEYBOARD means console input.
DISPLAY means console output.
PRINTER specifies the system's main printer.
PRINTER-1 specifies the system's second printer.
Character-string must not be a reserved word, a user-defined word that is defined elsewhere, or a literal.