COBOL Manual for TNS/E Programs (H06.03+)

Data Fundamentals
HP COBOL Manual for TNS/E Programs520347-003
4-19
Qualifiers
Identifiers
Condition-Names
Qualifiers
When the name of a data element exists within a hierarchy of names, you must be able
to make references to the name unique by mentioning one or more names defined at
higher levels of the hierarchy. The higher-level names are called qualifiers. Although
you must provide enough qualifiers to make the name unique, you need not include all
levels. For more information on qualifiers, see Qualified Names.
Subscripts
A subscript, or set of subscripts, identifies an element in a table (created by an
OCCURS clause). Whenever a statement in the Procedure Division refers to an
individual table element or any item subordinate to a table element, that reference
must include a subscript.
If the data item belongs to a table nested within one or more other tables (because
more than one OCCURS clause applies to the data-name), a reference to the data
item must include a subscript corresponding to each table (except in SEARCH
statements and some intrinsic functions, which do not allow subscripts).
If a condition-name is associated with a data item for which subscripts are required, a
reference to that condition-name must also include appropriate subscripts.
Topics:
Subscript Syntax
Number and Range of Subscripts
Subscript Syntax
data-name
is either a data item described with an OCCURS clause or a data item subordinate
to a data item described with an OCCURS clause. If data-name is qualified, the
subscripts follow the qualifiers.
Note. A program that executes on TNS or TNS/R processors can use indexes instead of
subscripts, which might be more efficient. For more information, see the COBOL Manual for
TNS and TNS/R Programs. For the ECOBOL compiler, there is no difference between indexes
and subscripts.
condition-name
data-name ( )subscript
VST006.vsd