HP 3000 Manuals

Abbreviated Combined Relation Conditions [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation


HP COBOL II/XL Reference Manual

Abbreviated Combined Relation Conditions 

If you combine simple or negated simple relation conditions with logical
connectives (AND and OR) in a consecutive sequence in such a way that:

   *   No parentheses are used in the consecutive sequence, and

   *   A succeeding relation condition contains the same subject as the
       preceding relation condition, or

   *   A succeeding relation condition contains the same subject and the
       same relational operator,

you can abbreviate any relation condition, except the first, within the
consecutive sequence.

There are two ways by which you can abbreviate such relation conditions.
The first is by omitting the subject of the relation condition; the
second is by omitting the subject and the relational operator of the
relation condition.  Abbreviated combined relation conditions have the
following format:

[]
The effect of using such abbreviations is that the last preceding stated subject is inserted in place of the omitted subject, and the last stated relational operator is inserted in place of the relational operator. In order to ensure that an abbreviated relation condition is valid, insert the omitted subject and relational operator. If, after insertion, the combined relation condition is valid according to the rules in Table 8-4 above, the abbreviated relation condition is valid. The end of an abbreviated relation condition is signified by the first occurrence of a complete simple condition within a complex condition. The word NOT can be used in two different ways: as part of a relational operator or as the logical negation operator. The rules for its usage in an abbreviated combined relation condition are as follows: * If the word immediately following NOT is one of the following: GREATER, LESS, EQUAL, or one of the equivalent symbols ( >, <, = ), then NOT participates as part of the relational condition. * If the word immediately following NOT is not one of those listed in the above paragraph, it is considered to be the negation operator. Thus, it negates only the first occurrence of the abbreviated relation condition. Examples A > B AND NOT < C OR D is equivalent to: ((A > B) AND (A NOT < C)) OR (A NOT < D) A NOT EQUAL B OR C is equivalent to: (A NOT EQUAL B) OR (A NOT EQUAL C) NOT A = B OR C is equivalent to: (NOT (A = B)) OR (A = C) NOT (A GREATER B OR < C) is equivalent to: NOT ((A GREATER B) OR (A < C)) NOT (A NOT > B AND C AND NOT D) is equivalent to: NOT ((((A NOT > B) AND ( A NOT > C)) AND (NOT (A NOT > D))))


MPE/iX 5.0 Documentation