VMS Help  —  COBOL  PROCEDURE_DIVISION, EVALUATE
  The EVALUATE statement selects a program action based on the evaluation
  of one or more conditions.

  Format -

           { subj-item }   [      { subj-item } ]
  EVALUATE { TRUE      }   [ ALSO { TRUE      } ] ...
           { FALSE     }   [      { FALSE     } ]

      { {    { ANY                                   }
      { {    { cond                                  }
      { {WHEN{ TRUE                                  }
      { {    { FALSE                                 }
      { {    { [NOT] {obj-item [{THRU   } obj-item]} }
      { {    {       {         [{THROUGH}         ]} }

      [     { ANY                                  }]     }           }
      [     { cond                                 }]     }           }
      [ALSO { TRUE                                 }] ... } ... stment} ...
      [     { FALSE                                }]     }           }
      [     { [NOT] {obj-item [{THRU   } obj-item]}}]     }           }
      [     {       {         [{THROUGH}         ]}}]     }           }

      [ WHEN OTHER stment ]

      [ END-EVALUATE ]

1  –  subj-item

  is an identifier, an arithmetic or conditional expression, or a literal
  other than the figurative constant ZERO.

2  –  cond

  is a conditional expression.

3  –  obj-item

  is a literal, an identifier, or an arithmetic expression.

4  –  stment

  is an imperative statement.
Close Help