File Status Interview Questions


What is file status and why it is used?

COBOL file status codes provide information about the result of each file operation executed.

How can you handle file processing errors in COBOL, and what are some of the common FILE STATUS codes used for error identification?

When a file operation like OPEN, READ, WRITE, etc., is executed, a status code is returned to the variable coded with the FILE STATUS clause.

Which FILE STATUS codes are frequently used to identify errors?

10, 24, 39, 92

What is file status 39?

File OPEN was unsuccessful because a conflict was detected between the actual file attributes and the attributes specified for that file in the program.

What is file status 92?

It is a logic error and should correct the program logic.

Frequently Asked Questions -

How can you handle file status errors in COBOL I/O operations?

What is file status 39 and 92?