Previous Topic Next topic Print topic


File Section

The file description entry (FD) represents the highest level of organization in the File Section. The FILE SECTION header is followed by a file description entry consisting of a level indicator (FD), a file-name and a series of independent clauses. The clauses in the file description entry specify the size of the logical and physical records, the external name of the file, and the names of the data records which comprise the file. The entry itself is terminated by a period.

An SD file description gives information about the size and the names of the data records associated with a file to be sorted or merged. There are no label procedures which the user can control, and the rules for blocking and internal storage are peculiar to the SORT and MERGE statements.

The elements allowed in a file description entry and sort-merge file description entry are defined in the topic File Description Entry Skeleton.

Relationship with Sort-Merge

The sort-merge module provides the capability to sort elements of a table in the Data Division. The files specified in the USING and GIVING phrases of the SORT and MERGE statements must be described implicitly or explicitly in the FILE-CONTROL paragraph as having sequential organization and sequential access mode. No I/O statement can be executed for the file named in the sort-merge file description.

ANS85 The files specified in the USING and GIVING phrases of the SORT and MERGE statements can be described explicitly in the FILE-CONTROL paragraph as having either indexed or relative organization and can have either sequential or dynamic access mode.

Record Description Structure

A record description consists of a set of data description entries which describe the characteristics of a particular record. Each data description entry consists of a level-number, a data-name if required and a series of independent clauses as required. A record description has a hierarchical structure and, therefore, the clauses used with an entry can vary considerably, depending upon whether or not it is followed by subordinate entries. The structure of a record description is defined in the topic Concept Of Levels in the chapter Concepts of the COBOL Language, while the elements allowed in a record description are defined in the topic File Description Entry Skeleton.

Previous Topic Next topic Print topic