EVALUTE in COBOL is similar to the “Select Case statement” in Microsoft Visual Basic. The “EVALUATE” statement was introduced with COBOL-85 and can use the COBOL EVALUATE for a variety of purposes. From the performance perspective, the COBOL EVALUATE statement is better than COBOL nested if...
In EVALUATE, no WHEN satisfied, then control pass to next statement. (COBOL question. Think twice before answer it) FALSE TRUE NONE
calculates tax rate based on income, age and sex. First WHEN clause will satisfy if condition on income (>= 10000 and < 500000) is true, gender is �M� and age is in range of 20 to 60, if it is true, then MOVE statement after first when will get executed, and control come ...
An exception is the WHEN OTHER phrase, which must come last. related tasks Coding a choice of actions related references EVALUATE statement (Enterprise COBOL for z/OS® Language Reference) General relation conditions (Enterprise COBOL for z/OS Language Reference)...
Operands before the WHEN phrase Are interpreted in one of two ways, depending on how they are specified: Individually, they are called selectionsubjects. Collectively, they are called asetof selection subjects. Operands in the WHEN phrase
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 are called a set of selection subjects. Operands in the WHEN phrase Are interpreted in one of two ways, depending on...
Operands before the WHEN phrase Are interpreted in one of two ways, depending on how they are specified: Individually, they are called selectionsubjects. Collectively, they are called asetof selection subjects. Operands in the WHEN phrase
Operands before the WHEN phrase Are interpreted in one of two ways, depending on how they are specified: Individually, they are called selectionsubjects. Collectively, they are called asetof selection subjects. Operands in the WHEN 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 selection objects: EVALUATE CARPOOL-SIZE WHEN 1 MOVE "SINGLE" TO PRINT-CARPOOL-STATUS WHEN 2 MOVE "COUPLE" TO PRINT-CARPOOL-STATUS WHEN 3 THRU 6...