When processing multiple files in a COBOL program, you encounter an exception in one file but want to continue processing the other files without interruption. How can you achieve this?

  • Implement exception handling with the EXIT PROGRAM statement
  • Set the FILE STATUS to 'OK' manually
  • Use the CONTINUE statement after error handling
  • Use the NOT ON EXCEPTION clause in the file control entry
To continue processing other files without interruption in case of an exception in one file, you can use the NOT ON EXCEPTION clause in the file control entry. This allows the program to skip the file that has an exception and continue processing the next files.
Add your answer
Loading...

Leave a comment

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