COBOL Manual for TNS and TNS/R Programs

Procedure Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
8-67
Abbreviated Combined Relation Conditions
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.
NOT as Modifier or Operator
The reserved word NOT in an abbreviated combined relation condition is
interpreted as a part of the relational operator if the word immediately following
NOT is GREATER, >, LESS, <, EQUAL, or =; otherwise, NOT is interpreted as a
logical operator, and the implied insertion of a subject or relational operator results
in a negated relation 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