Class conditions test where an item is NUMERIC,
ALPHABETIC, ALPHABETIC-LOWER, or ALPHABETIC-HIGHER (as in lower or upper case).
Relational conditions allow comparisons, i.e: GREATER THAN, LESS THAN,
EQUAL TO or their sign equivalent: " > ", " < ", " = ", respectively.
Sign conditions test whether an item IS POSITIVE, IS NEGATIVE, or IS NOT
ZERO. (note 'IS' is optional)
Condition-name conditions are as described in the section, where a named
condition is defined in the data division using a level 88 description.
Conditions can be combined using AND, OR, AND NOT, OR NOT,
and brackets. The most common combinations would probably be GREATER THAN OR
EQUAL TO and LESS THAN OR EQUAL TO, which can simply be written >= and
<= respectively. Also, NOT EQUAL TO would be <> although I find the
Fujitsu compiler rejects '<>' so I just use 'NOT = ' instead.
More complex combinations can be acheived with the use of
IF ( X > Y ) AND ( ( Y + 10 < Z ) OR ( X - 10 > Z ) ) THEN ...
[true] AND [false] = FALSE
[true] AND [true] = TRUE
[true] OR [false] = TRUE
[true] OR [true] = TRUE
NOT [true] = FALSE
NOT [false] = TRUE
Alpha-numeric comparisons can also be made that relate to their ASCII character
value, so 'A' < 'Z' etc...
The SET verb is quite useful when working with
boolean items and has been discussed .