Standard evaluation procedure
EVALUATE identifier WHEN valuexpression1 statementblock [ . . . WHEN valuexpressionN statementblockN ] [WHEN OTHER statementblock ]
Decision table.
EVALUATE identifier1[, ..., identifierN] WHEN valuexpression1[, ..., valuexpressionN] statementblock [ . . . WHEN valuexpressionN+1[, ..., valuexpressionN+N] statementblock ] [WHEN OTHER statementblock ]
identifier |
Any COBOL identifier |
value-xpression |
In Format 1, a data name or a group of COBOL literals, identifiers, and arithmetic expressions forming expression1, expression2, . . .. |
In Format 2, one of the following ANY, or expression1 [THRU expression2]... OR expression3[THRU expression4]... [OR expression5 [THRU expression6]] Symbols such as =, <, and > are not valid. |
EVALUATE MONTHS, REGION WHEN 1 THRU 11, 'EAST' WRITE NEW-EAST-REC WHEN 1 THRU 11, 'WEST' WRITE NEW-WEST-REC WHEN 61 THRU 9999, 'EAST' WRITE PREFERRED-EAST-REC WHEN 61 THRU 9999, 'WEST' WRITE PREFERRED-WEST-REC