Interpreting Selection Subjects and Selection Objects

Operands before the WHEN phrase

Individually, they are called selection subjects.
Collectively, they are called a set of selection subjects.

Operands in the WHEN phrase

Individually, they are called selection objects.
Collectively, they are called a set of selection objects.

ALSO
Separates selection subjects within a set of selection subjects; separates selection objects within a set of selection objects.
THROUGH and THRU
Are equivalent. Two operands connected by a THRU phrase must be of the same class. The two operands thus connected constitute a single selection object.
The number of selection objects within each set of selection objects must be equal to the number of selection subjects. Each selection object within a set of selection objects must correspond to the selection subject having the same ordinal position within the set of selection subjects, according to the following rules:
  • Identifiers, literals, or arithmetic expressions appearing within a selection object must be valid operands for comparison to the corresponding operand in the set of selection subjects.
  • Condition-1, condition-2, or the word TRUE or FALSE appearing as a selection object must correspond to a conditional expression or the word TRUE or FALSE in the set of selection subjects.
  • Condition-1, and condition-2 may be any form of a conditional expression.
  • The word ANY may correspond to a selection subject of any type.
  • Conditional expressions may be simple or complex conditions.
IBM Extension
IBM Extension
  • Where numeric literals are permitted, floating-point literals are permitted.
  • Identifiers can reference items whose usage is implicitly or explicitly defined as POINTER or PROCEDURE-POINTER.
  • Identifiers can reference DBCS, national, or floating-point data items.
  • Identifiers can reference date-time data items.
  • Start of changeWhere nonnumeric literals are permitted, DBCS and national literals are permitted also.End of change
End of IBM Extension
End of IBM Extension