WHxx - When True Then Select
See Also
 |  RPG Example

Description:

Determines where control passes after the SELECT operation is processed.

RPG Style Fixed Format:

Op Code:

Factor 1:

Factor 2:

Result Field:

Indicators:

WHxx

Operand

Operand

 

 

Free Format:

WHxx
F1
(Operand)
RELOP
(Comparison Operator)
F2
(Operand)

Comments:

If the expression is the first one True on the list of WHxx commands after the SELECT, the group of statements after the WHxx will be executed.

If no expressions or WHxx commands evaluate to True, the group of commands after the OTHER statement will be executed (if specified).

xx in the Fixed Format editor may be any of the following:

EQ - Equal to

LT - Less Than

GT - Greater Than

LE - Less Than or Equal To

GE - Greater Than or Equal To

NE - Not Equal To

When coding in ILE, this op code must be coded as an Extended Calculation Specifications (X-Spec).