Constraints for Referencing User-Defined Words

In general, a user-defined word belongs to one, and only one, of the types listed in the preceding table. A user-defined word must also be unique within the type to which it belongs.

There are two exceptions to the general rule:
  • A level-number or segment-number does not need to be unique. The user-defined word for any level-number or segment-number can be identical to the user-defined word for another level-number or segment number.
  • A user-defined word can be duplicated within one of the following, provided that uniqueness of reference can be maintained:
    • The group comprising condition-names, data-names, and record-names
    • Paragraph-names
    • Text-names
    For more information about ensuring the uniqueness of reference for such names, see Methods of Data Reference.
The following types of user-defined words can be referenced by statements and entries in that program in which the user-defined word is declared:
  • paragraph-name
  • section-name
The following types of user-defined words can be referenced by any COBOL program:
  • library-name
  • program-name
  • text-name
The following types of names, when they are declared within a Configuration Section, can be referenced by statements and entries either in that program which contains a Configuration Section or in any program contained within that program:
  • alphabet-name
  • class-name
  • condition-name
  • mnemonic-name