Relation Condition

A relation condition compares two operands, either of which may be an identifier, a literal, an arithmetic expression, index-name or a function-identifier. The relation condition must contain at least one reference to an identifier.

Read syntax diagramSkip visual syntax diagram
Relation Condition - Format

>>-operand-1--+----+--+---------+------------------------------->
              '-IS-'  |     (1) |   
                      '-NOT-----'   

>--+-+-GREATER--+------+-+---------------+--operand-2----------><
   | |          '-THAN-' |               |              
   | +->-----------------+               |              
   | +-LESS--+------+----+               |              
   | |       '-THAN-'    |               |              
   | +-<-----------------+               |              
   | +-EQUAL--+----+-----+               |              
   | |        '-TO-'     |               |              
   | '-=-----------------'               |              
   +-GREATER--+------+--OR EQUAL--+----+-+              
   |          '-THAN-'            '-TO-' |              
   +->=----------------------------------+              
   +-LESS--+------+--OR EQUAL--+----+----+              
   |       '-THAN-'            '-TO-'    |              
   '-<=----------------------------------'              

Notes:
  1. NOT GREATER THAN OR EQUAL TO, NOT >=, NOT LESS THAN OR EQUAL TO, and NOT <=, are IBM Extensions.
operand-1
The subject of the relation condition. Can be an identifier, literal, function-identifier, arithmetic expression, or index-name.
operand-2
The object of the relation condition. Can be an identifier, literal, function-identifier, arithmetic expression, or index-name.

The relational operator specifies the type of comparison to be made. Each relational operator must be preceded and followed by a space.

Relational Operator
Can Be Written
IS GREATER THAN
IS >
IS NOT GREATER THAN
IS NOT >
IS LESS THAN
IS <
IS NOT LESS THAN
IS NOT <
IS EQUAL TO
IS =
IS NOT EQUAL TO
IS NOT =
IS GREATER THAN OR EQUAL TO
IS >=
IS LESS THAN OR EQUAL TO
IS <=
IBM Extension
IS NOT GREATER THAN OR EQUAL TO
IS NOT >=
IS NOT LESS THAN OR EQUAL TO
IS NOT <=
End of IBM Extension
Related Information: