Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What is the purpose of the EXIT PROGRAM statement?
Answer: The EXIT PROGRAM statement in COBOL is used to terminate the entire program. It is often used in conjunction with a condition or as part of an error-handling routine.

Example:

IF ERROR-FLAG = 'Y' THEN
  EXIT PROGRAM.
END-IF.
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook