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

Procedure Division
HP COBOL Manual for TNS/E Programs520347-003
8-67
Abbreviated Combined Relation Conditions
rel-operator
is a relational operator.
object
is an identifier, a literal, an arithmetic expression, or an index-name.
This abbreviation technique is available when a group of the characteristics shown in
Table 8-19 is present.
When either abbreviated form is used, the omitted subject is considered to be the
same as the last explicitly stated subject, and the omitted operator is considered to be
the same as the last explicitly stated operator.
If any portion of such an abbreviated condition is enclosed in parentheses, all the
subjects and operators required for the evaluation of that portion must be included in
the same set of parentheses.
Usage Considerations:
Abbreviation in a Sequence of Relation Conditions
Within a sequence of relation conditions, both of the preceding forms of
abbreviation can be used. The effect of using such abbreviations is as if the last
preceding stated subject were inserted in place of the omitted subject, and the last
stated relational operator were inserted in place of the omitted relational operator.
This insertion of an omitted subject or relational operator terminates once a
complete simple condition is encountered within a complex condition.
Table 8-19. Abbreviated Combined Relation Conditions
Characteristics Example
Simple relation conditions
or
negated simple relation conditions
A = C
NOT A = B
are combined using AND and OR operators NOT A = B OR A = C
in which a relation condition subject or subject
and relational operator is repeated
and there are no parentheses (except those
delimiting subscripts or reference modifiers)
within the sequence.
“A =” is repeated
When these conditions are met, any relation
condition except the first one in the series can
be abbreviated in one of these ways:
Omit the subject.
Omit the subject and the relational
operator.
The first “A =”
NOT A = B OR = C
NOT A = B OR C