HELPLIB.HLB  —  COBOL  PROCEDURE_DIVISION, miscellaneous_topics, phrases  ON_EXCEPTION
  The ON EXCEPTION phrase allows execution of an imperative statement
  when an exception (or error) condition occurs.

  The ON EXCEPTION option of the CALL statement prevents control
  transfer of the CALL and triggers the execution of the imperative
  statement related to the CALL.

  The ON EXCEPTION option of the ACCEPT statement allows you to handle
  data entry errors when ACCEPTing into a numeric data field WITH
  CONVERSION.

  Format -

   ON EXCEPTION stment
Close Help