Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What is the purpose of the REJECT statement in COBOL?
Answer: The REJECT statement in COBOL is used to return a record to an input file after it has been read. It is often used in conjunction with the REWRITE statement.

Example:

READ INPUT-FILE INTO DATA-RECORD.
IF CONDITION
  REJECT DATA-RECORD.
END-IF.
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook