EVALUATE Statement

The EVALUATE statement provides a shorthand notation for a series of nested IF statements. It can evaluate multiple conditions. That is, the IF statements can be made up of compound conditions. The subsequent action of the object program depends on the results of these evaluations.

EVALUATE Statement - Format

Read syntax diagramSkip visual syntax diagramEVALUATEidentifier-1literal-1expression-1TRUEFALSEALSOidentifier-2literal-2expression-2TRUEFALSEWHEN phraseALSO phraseimperative-stmt-1WHEN OTHERimperative-stmt-2END-EVALUATE
WHEN phrase
Read syntax diagramSkip visual syntax diagramWHENANYcondition-1TRUEFALSENOTidentifier-3literal-3arith-expr-1THROUGHTHRUidentifier-4literal-4arith-expr-2
ALSO phrase
Read syntax diagramSkip visual syntax diagramALSOANYcondition-2TRUEFALSENOTidentifier-5literal-5arith-expr-3THROUGHTHRUidentifier-6literal-6arith-expr-4