Relation conditions
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 cases:
- Two operands of class alphabetic
- Two operands of class alphanumeric
- Two operands of class DBCS
- Two operands of class national
- Two operands of class numeric
- Two operands of different classes where each operand is one of the classes alphabetic, alphanumeric, or national
- Two operands where one is a numeric integer and the other is class alphanumeric or national
- Two operands where one is class DBCS and the other is class national
- Comparisons involving indexes or index data items
- Two data pointer operands
- Two procedure pointer operands
- Two function pointer operands
- Two object reference operands
- An alphanumeric group and any operand that has usage DISPLAY, DISPLAY-1, or NATIONAL
The following relation condition formats are defined:
- A general relation condition, for comparisons that involve only data items, literals, index-names, or index data items. For details, see General relation conditions.
- A data pointer relation condition. For details, see Data pointer relation conditions.
- A program pointer relation condition, for comparison of procedure pointers or function pointers. For details, see Procedure-pointer and function-pointer relation conditions.
- An object-reference relation condition. For details, see Object-reference relation conditions.