In this topic, we described about the below sections -
A relation condition specifies the comparison of two operands. The relational operator that joins the two operands specifies the type of comparison.
The relation condition is true if the specified relation exists between the two operands. The relation condition is false if the specified relation does not exist.
Comparisons are defined for the following -
- Two operands of class alphabetic
- Two operands of class alphanumeric
- Two operands of class numeric
- Two operands of different classes where each operand is one of the classes alphabetic or alphanumeric
- Two operands where one is a numeric integer and the other is class alphanumeric
- Comparisons involving indexes or index data items
- An alphanumeric group and any operand that has usage DISPLAY
The relation condition formats are below -
- General relation conditions
General relation conditions -
Compares two operands either of can be an identifier, literal, arithmetic expression or index-name.
The subject of the relation condition. Can be an identifier, literal or arithmetic expression.
The object of the relation condition. Can be an identifier, literal or arithmetic expression.
An alphanumeric literal can be enclosed in parentheses within a relation condition. The relation condition must contain at least one identifier.
Relational operators and their meanings -
|IS GREATER THAN
|IS NOT GREATER THAN
IS NOT >
|Not greater than|
|IS LESS THAN
|IS NOT LESS THAN
IS NOT <
|Not less than|
|IS EQUAL TO
|IS NOT EQUAL TO
IS NOT =
|Not equal to|
|IS GREATER THAN OR EQUAL TO
|Is greater than or equal to|
|IS LESS THAN OR EQUAL TO
|Is less than or equal to|