In a COBOL program, you have encountered a situation where you need to exit the program due to a critical error. Which statement should you use to ensure a clean program termination?
- EXIT PARAGRAPH
- EXIT PROGRAM
- GOBACK
- STOP RUN
The STOP RUN statement in COBOL is used to terminate the program gracefully. It releases resources, closes files, and performs necessary cleanup before ending the program.
Loading...
Related Quiz
- How can you handle file positioning errors in COBOL?
- What is the purpose of the GLOBAL clause in COBOL for variable declarations?
- What is the primary purpose of the MOVE statement in COBOL?
- A group item in COBOL can contain multiple elementary items and is defined using the _________ keyword.
- What does "scope" refer to in the context of COBOL programming?