COBOL Manual for TNS and TNS/R Programs
Language Elements
HP COBOL Manual for TNS and TNS/R Programs—522555-006
3-14
COBOL Words
Within the Data Division, you can use file-names from file description (FD) or sort-
merge file description (SD) entries and data-names from data description entries for
qualification. Within the levels of qualification, file-names (names associated with level
indicators FD and SD) are most significant, then data-names for level-01 items, and
then data names for level-02 items, and so on to level-49 items. The name of a
conditional variable can qualify any of its condition-names.
These rules apply to qualification of names:
•
Each qualifier must be at a higher level than the previous one and stay within the
same structure of the name it qualifies.
•
The same name cannot occur at different levels in a structure; otherwise, the name
could qualify itself.
•
A data-name used as a qualifier cannot be subscripted; all subscripts that apply to
a qualified data-name appear after all qualifiers.
•
A name can be qualified even though it does not need qualification. If there is more
than one combination of qualifiers that make a name unique, then any one of them
will do, including complete qualification (naming all qualifiers). HP COBOL permits
a name to be qualified completely, with a name from every level of its structure.
•
If a data-name or a condition-name is assigned to more than one element in a
source program, the data-name or condition-name must be qualified each time it is
referred to in the Procedure, Environment, and Data divisions (except in the
REDEFINES clause where, by context, qualification is unnecessary). The name of
a data-item can be used as the lowest level qualifier for any of its associated
condition-names.
•
If a word defined as a status condition-name is assigned to more than one element
in a source program, the condition-name must be qualified by the mnemonic-name
of its external switch each time it is mentioned in the Procedure Division. The
qualification of status condition-names is an HP COBOL extension.
Qualified LINAGE COUNTER:
VST005.vsd
LINAGE-COUNTER
OF
IN
file-name