VMS Help  —  COBOL  PROCEDURE_DIVISION, COMPUTE
  The COMPUTE statement evaluates an arithmetic expression and stores the
  result.

  Format -

   COMPUTE { rsult [ ROUNDED ] } ... =  arithmetic-expression

      [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ]

      [ END-COMPUTE ]

1  –  rsult

  is the identifier of an elementary numeric item or an elementary
  numeric edited item.  It is the resultant identifier.

2  –  stment

  is an imperative statement.
Close Help