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.
Loading...
Related Quiz
- What is the purpose of the REDEFINES clause in COBOL?
- The _______ clause in a PERFORM statement is used to specify the condition for loop termination.
- How can you ensure that a variable retains its value between multiple program invocations in COBOL?
- You are developing a COBOL application that needs to retrieve customer information from a database. Which SQL statement should you use for this purpose?
- When using a PERFORM loop with the VARYING clause, the _______ clause determines how the loop control variable changes in each iteration.