Example: EVALUATE using THRU phrase Related Posts In EVALUATE, no WHEN satisfied, then control pass to next statement. (COBOL question. Think twice before answer it) FALSE TRUE NONE
この例は、THRU 句をコーディングすることにより、いくつかの条件をある範囲の値でコーディングして同じ処理が行われるようにする方法を示しています。 THRU 句内のオペランドは、同じクラスにする必要があります。
EVALUATE statement (Enterprise COBOL for z/OS® Language Reference) General relation conditions (Enterprise COBOL for z/OS Language Reference)Example: EVALUATE using THRU phrase This example shows how you can code several conditions in a range of values to lead to the same processing action by...
EVALUATE TRUE ALSO WS-GENDER ALSO WS_AGE WHEN WS-INCOME >= 10000 AND < 500000 ALSO �M� ALSO 20 THRU 60 MOVE 13.5 TO WS-RATE WHEN WS-INCOME >= 10000 AND < 500000 ALSO �F� ALSO 20 THRU 60 MOVE 12.0 TO WS-RATE WHEN OTHER MOVE 0 TO WS-RATE END-EVALUATE. This example...
All identifiers in the EVALUATE statement must not be dynamic-length group items. 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...
ANYcondition-1TRUEFALSENOTidentifier-3literal-3arithmetic-expression-1THROUGHTHRUidentifier-4literal-4arithmetic-expression-2 Operands before the WHEN phrase Are interpreted in one of two ways, depending on how they are specified: Individually, they are called selectionsubjects. ...
This example shows how you can code several conditions in a range of values to lead to the same processing action by coding the THRU phrase. Operands in a THRU phrase must be of the same class. In this example, CARPOOL-SIZE is the selection subject; 1, 2, and 3 THRU 6 are the ...
All identifiers in the EVALUATE statement must not be dynamic-length group items. 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...
ANYcondition-2TRUEFALSENOTidentifier-5literal-5arithmetic-expression-3THROUGHTHRUidentifier-6literal-6arithmetic-expression-4 Operands before the WHEN phrase Are interpreted in one of two ways, depending on how they are specified: Individually, they are called selection subjects. Collectively, they ar...