OTHER (Otherwise Select)

Free-Form Syntax OTHER
Code Factor 1 Factor 2 Result Field Indicators
OTHER

The OTHER operation begins the sequence of operations to be processed if no WHENxx or WHEN (When True Then Select) condition is satisfied in a SELECT group. The sequence ends with the ENDSL or END operation.

Rules to remember when using the OTHER operation:

For more information, see Structured Programming Operations.

Figure 360. OTHER Operation
*...1....+....2....+....3....+....4....+....5....+....6....+....7....+....
CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq....
 *
 * Example of a SELECT group with WHENxx and OTHER.  If X equals 1,
 * do the operations in sequence 1; if X does not equal 1 and Y
 * equals 2, do the operations in sequence 2.  If neither
 * condition is true, do the operations in sequence 3.
 *
C                   SELECT
C     X             WHENEQ    1
 *
 * Sequence 1
 *
C                      :
C                      :
C     Y             WHENEQ    2
 *
 * Sequence 2
 *
C                      :
C                      :
C                   OTHER
 *
 * Sequence 3
 *
C                      :
C                      :
C                   ENDSL


[ Top of Page | Previous Page | Next Page | Contents | Index ]