FILE STATUS
A two-character code COBOL sets after every I/O operation. Declare it on the SELECT and check it — 00 success, 10 end of file, 23 not found, 35 file not found at open.
See it in context
COBOL basics: Logic, files and calling other programs