Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
SCREEN COBOL Source Program
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
2-22
Complex Conditions
interaction of all the logical operators on the individual truth values of simple
conditions, or on the intermediate truth values of conditions connected or negated.
Tabl e 2- 9 lists and defines the logical operators.
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:
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 } }










