COBOL, what is "ON EXCEPTION UNDO" used for in error handling?

  • To display an error message to the user
  • To ignore exceptions and proceed with the program execution
  • To roll back changes made to the file in case of an exception
  • To terminate the program when an exception occurs
"ON EXCEPTION UNDO" in COBOL is used to roll back changes made to the file in case of an exception. It ensures data consistency by undoing any modifications made before the exception occurred.
Add your answer
Loading...

Leave a comment

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