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

combined-part
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 56 is
present.
Table 56 Abbreviated Combined Relation Conditions
ExampleCharacteristics
A = CSimple relation conditions
or
NOT A = Bnegated simple relation conditions
NOT A = B OR A = Care combined using AND and OR operators
A =” is repeatedin 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.
The first “A =”When these conditions are met, any relation condition
except the first one in the series can be abbreviated in one
of these ways:
NOT A = B OR = C
Omit the subject.
NOT A = B OR C
Omit the subject and the relational operator.
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.
Conditional Expressions 275