The DATA RECORDS Clause

The DATA RECORDS clause serves only as documentation for the names of data records with their associated file.

The DATA RECORDS clause of the file description entry is classed as an obsolete element in the ANSI'85 standard and is scheduled to be deleted from the next full revision of the ANSI Standard.

All dialects in this COBOL implementation fully support this syntax. The FLAGSTD Compiler directive can be used to detect all occurrences of this syntax.

Although part of the standard COBOL definition, this feature is explicitly excluded from the X/Open COBOL language definitions and should not be used in a conforming X/Open COBOL source program.

General Format


*

Syntax Rules

  1. Data-name-1 and data-name-2 are the names of data records and should have 01 level-number record descriptions, with the same names, associated with them.

    These data-names do not have to be associated with any data description entry in the program.

General Rules

  1. The presence of more than one data-name indicates that the file contains more than one type of data record. These records can be of differing sizes, different formats, and so on. The order in which they are listed is not significant.
    Note: When using multiple 01 level items within an FD, if the SELECT statement contains key definitions, the key sizes must be contained within the minimum record length of that FD.
  2. Conceptually, all data records within a file share the same area. This is in no way altered by the presence of more than one type of data record within the file.