ILE COBOL Language Reference

Qualification

A name can be made unique if it exists within a hierarchy of names, and the name can be identified by specifying one or more higher-level names in the hierarchy. The higher-level names are called qualifiers, and the process by which such names are made unique is called qualification.

Qualification is specified by placing one or more phrases after a user-specified name, with each phrase made up of the word IN or OF followed by a qualifier. (IN and OF are logically equivalent.)

References to Data Division Names - Format 1
 
                       .-------------------------.
                       V                         |
>>-+-data-name-1----+----+---------------------+-+-------------->
   '-condition-name-'    '-+-IN-+--data-name-2-'
                           '-OF-'
 
>--+---------------------+-------------------------------------><
   '-+-IN-+--file-name-1-'
     '-OF-'
 
 
References to Data Division Names - Format 2
 
>>-LINAGE-COUNTER--+---------------------+---------------------><
                   '-+-IN-+--file-name-2-'
                     '-OF-'
 
 

In any hierarchy, the data name associated with the highest level must be unique, and cannot be qualified.

You must specify enough qualification to make the name unique; however, it may not be necessary to specify all the levels of the hierarchy. For example, if there is more than one file whose records contain the field EMPLOYEE-NO, but only one of the files has a record named MASTER-RECORD:

Related Information:

References to Data Division Names

Data Division names that are explicitly referenced in a program must be either uniquely defined, or made unique through qualification. Unreferenced data-names need not be uniquely defined.

A data-name associated with a level-number 01, or with an FD or SD level indicator in the File Section, is the highest level in a data hierarchy. If referenced, it must be uniquely defined, because it cannot be qualified. Data items with level-numbers 02 through 49 are successively lower levels in a data hierarchy, and if referenced, must be either uniquely defined, or made unique through qualification. Level-77 data-names, if referenced, must be uniquely defined, because they cannot be qualified.

References to Procedure Division Names

If explicitly referenced, a paragraph-name must not be duplicated within a section. When a paragraph-name is qualified by a section-name, the word SECTION must not appear. A paragraph-name need not be qualified when referred to within the section in which it appears. A paragraph-name or section-name appearing in a program cannot be referenced from any other program. A section-name, described in Section, is the highest (and only) qualifier available for a paragraph-name and must be unique.

References to Procedure Division Names - Format 1
 
>>-paragraph-name--+----------------------+--------------------><
                   '-+-IN-+--section-name-'
                     '-OF-'
 
 
References to Procedure Division Names - Format 2
 
>>-section-name------------------------------------------------><
 
 

References to COPY Libraries

If more than one COBOL library is available to the compiler during compilation, text-name can be qualified each time it is referenced.

References to COPY Libraries - Format 3
 
>>-text-name--+---------------------------------------+--------><
              |                       (1)             |
              '-+----+--library-name--------file-name-'
                +-IN-+
                '-OF-'
 
 

Notes:

  1. Required hyphen between library-name-file-name to qualify

For rules on referencing COPY libraries, see COPY Statement.

Qualification Rules

The rules for qualifying a name are:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]