As a REXX instruction, the flowchart example looks like:
SELECT
WHEN expression THEN instruction
WHEN expression THEN instruction
WHEN expression THEN instruction
.
.
.
OTHERWISE
instruction(s)
END
The language processor scans the WHEN clauses starting at the beginning until it
finds a true expression. After it finds a true expression, it ignores all other
possibilities, even though they might also be true. If no WHEN expressions are true,
it processes the instructions following the OTHERWISE clause.
As with the IF/THEN/ELSE instruction, when you have more than one instruction for
a possible path, begin the set of instructions with a DO and end them with an END.
However, if more than one instruction follows the OTHERWISE keyword, DO and
END are not necessary.
SELECT
WHEN
False
WHEN
False
WHEN
False
OTHERWISE
END
True
True
True
THEN
THEN
THEN
instruction
instruction
instruction
instruction(s)
Using Conditional Instructions
Chapter 4. Controlling the Flow Within an Exec 45