COBOL Manual for TNS and TNS/R Programs

Environment Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
6-23
FILE-CONTROL Paragraph
FILE-CONTROL Paragraph
If the FILE-CONTROL paragraph is present, it must be the first paragraph in the Input-
Output Section.
file-control-entry
has different syntax for sequential, line sequential, relative, indexed, queue, and
sort-merge files. See the appropriate topic.
Topics:
File-Control Entries in General
File-Control Entries for Sequential Files
File-Control Entries for Line Sequential Files
File-Control Entries for Relative Files
File-Control Entries for Indexed Files
File-Control Entries for Queue Files
File-Control Entries for Sort-Merge Files
File-Control Entries in General
The file name of every data file and every sort-merge file described in the Data Division
must appear exactly once in the SELECT clause of a file-control entry. Likewise, every
file name that appears in the SELECT clause of a file-control entry must also appear in
a corresponding data file 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.
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.
.
FILE-CONTROL
file-control-entry
VST036.vsd