You are developing a COBOL program for processing financial transactions, and you want to ensure that any error during processing is logged and reported. Which COBOL error handling technique would you choose for this scenario?

  • EXIT PROGRAM statement
  • ON EXCEPTION clause
  • STOP RUN statement
  • USE AFTER EXCEPTION option
The ON EXCEPTION clause in COBOL is used for handling errors during program execution. It allows you to define a set of actions to be taken when an exception occurs, such as logging and reporting errors in financial transactions.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *