You are developing a COBOL program for an online banking system. What type of exception handling approach would you use to ensure that transactions are rolled back in case of errors during fund transfers?

  • Implementing a nested IF statement
  • Utilizing the declarative exception handling with the USE AFTER option
  • Employing the EXIT PROGRAM statement
  • Using the COBOL ON EXCEPTION clause
In this scenario, declarative exception handling with the USE AFTER option is appropriate. It allows you to define a set of statements that execute after a specific exception occurs, ensuring proper rollback of transactions in case of errors during fund transfers.
Add your answer
Loading...

Leave a comment

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