この例は、THRU 句をコーディングすることにより、いくつかの条件をある範囲の値でコーディングして同じ処理が行われるようにする方法を示しています。 THRU 句内のオペランドは、同じクラスにする必要があります。 この例では、CARPOOL-SIZE は選択サブジェクト であり、1、 2、および ...
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...
The following example shows that you can code multipleWHENphrases if several conditions should lead to the same action. Doing so gives you more flexibility than usingonlytheTHRUphrase, because the conditions do not have to evaluate to values in a range norhave the same class. EVALUATE MARITAL-C...
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 selectionsubjects. ...
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. ...