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

Procedure Division
HP COBOL Manual for TNS/E Programs520347-003
8-54
Simple Conditions
Simple Conditions
A simple condition has a truth value of TRUE or FALSE. Enclosing a simple condition
within parentheses does not affect its truth value. The simple conditions are:
Relation Conditions in General
Relation Conditions With Nonpointer Operands
Relation Conditions With Pointer Operands
Class Conditions
Condition-Name Conditions (Conditional Variables)
Switch-Status Conditions
Sign Conditions
Relation Conditions in General
A relation condition causes a comparison of two operands. The relation condition has a
truth value of TRUE if the relation exists between the operands; otherwise, it has a
truth value of FALSE.
Usage Considerations:
Terminology
In the preceding syntax diagrams, the left-hand operand is called the subject of the
condition; the right-hand operand is called the object of the condition.
Where Pointer Relations Are Allowed
A relation with pointer operands is allowed in EVALUATE, IF, PERFORM, and
SEARCH VARYING statements. It is not allowed in SEARCH ALL statements,
because pointer data items have no meaningful order.
Cannot Compare Literal With Literal
At least one nonpointer operand must be an index-name, identifier, or arithmetic
expression containing at least one reference to a data item; that is, the relation
must include at least one nonliteral element.