Executing the EVALUATE statement

After the comparison operation is completed, execution of the EVALUATE statement proceeds.

  • If a WHEN phrase is selected, execution continues with the first imperative-statement-1 following the selected WHEN phrase. Note that multiple WHEN statements are allowed for a single imperative-statement-1.
  • If no WHEN phrase is selected and a WHEN OTHER phrase is specified, execution continues with imperative-statement-2.
  • If no WHEN phrase is selected and no WHEN OTHER phrase is specified, execution continues with the next executable statement following the scope delimiter.
  • The scope of execution of the EVALUATE statement is terminated when execution reaches the end of the scope of the selected WHEN phrase or WHEN OTHER phrase, or when no WHEN phrase is selected and no WHEN OTHER phrase is specified.