IF
IF processes a group of calculations if a comparison expression evaluation is True.
IF
Cond (Comparison Expression)
Parameters
Cond
Required. The comparison expression is evaluated at the end of the execution of the group of commands between the ENDIF, and END. If the expression is true, the group of commands is executed again.
Remarks
An ENDIF , or END is required to end the group of commands after the IF command.
In Encore RPG, IF was expanded to include an ELSEIF .
Example
If ACode = "A"
...
ElseIf ACode = "B"
...
ElseIf AcRec = "D"
...
Else
...
EndIf