In a COBOL program for processing inventory records, how would you handle exceptions when an item is out of stock and cannot be shipped?

  • EXCEPTION/ERROR declarative
  • IF statement with GOTO
  • PERFORM UNTIL
  • READ...INVALID KEY
The EXCEPTION/ERROR declarative in COBOL allows you to handle exceptions, such as an item being out of stock, in a structured manner. It provides a clean separation of error-handling logic from the main processing flow, enhancing code readability and maintainability.
Add your answer
Loading...

Leave a comment

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