ILE COBOL Language Reference

Resolution of Names

When a program, program B, is directly or indirectly contained within another program, program A, both programs may define objects using the same user-defined word. (Objects include, for example, a condition-name, a data-name, a file-name, a record-name, a function name, or a type-name.) When such a duplicated name is referenced in program B, the following rules are used to determine the referenced object:

  1. The referenced object is identified from the set of all names which are defined in program B and all global names defined in the directly containing program A and in any programs which directly or indirectly contain program A. Using this set of names, the normal rules for qualification and any other rules for uniqueness of reference are applied until one or more objects is identified.
  2. If only one object is identified, it is the referenced object.
  3. If more than one object is identified, no more than one of them can have a name local to program B unless each reference to them can be made unique with appropriate qualification. If zero or one of the objects has a name local to program B, the following rules apply:

Related Information:


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