Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)

SCREEN COBOL Source Program
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual426750-001
2-22
Complex Conditions
The logical operators must be preceded by a space and followed by a space.
Negated Simple Condition
A simple condition is negated through the use of the logical operator NOT. The negated
simple condition effects the opposite truth value for a simple condition. Parentheses
enclosing negated simple condition do not change the truth value.
Negated simple condition syntax is:
Combined and Negated Combined Conditions
A combined condition results from connecting conditions with AND or OR. Each
condition can be a simple condition, a negated condition, a combined condition or
negated combined condition, or a combination of these.
Combined and negated combined condition syntax is:
Abbreviated Combined Relation Conditions
In a relation where one item is compared to several others, the relation can be
abbreviated by leaving out the subject item name after the first reference to it. If the
relational operator is the same as the previous operator, the operator can also be omitted.
Abbreviated combined relation condition syntax is:
If NOT appears within the abbreviated condition and is not followed by an operator, the
keyword negates that portion of the condition, but does not automatically carry forward
Table 2-9. Logical Operators
AND Logical conjunction—The truth value is true if both conditions are true, and false if
one or both are false.
OR Logical inclusive OR—The truth value is true if one or both of the conditions is
true, and false if both conditions are false.
NOT Logical negation or reversal of truth value—The value is true if the condition is
false and false if the condition is true.
NOT simple-condition
condition { { AND } condition }
{ { OR } }
condition { { AND } [ NOT ] [ operator ] object }...
{ { OR } }