Post #1
0 votes
Sam
Reputation
5
Posts: 28
Joined: Jul 1, 2026, 2:30 PM
Posted: Jul 31, 2026, 11:17 AM
Mentor said never open a file without checking file status. I have seen PIC XX status fields in SELECT.
Is 00 the only good value? What about 97?
Mentor said never open a file without checking file status. I have seen PIC XX status fields in SELECT.
Is 00 the only good value? What about 97?
FILE STATUS is a two-byte code set after I/O. 00 = OK. 10 = end of file on READ. 23 = key not found. 35 = file not found. 97 sometimes OK on OPEN for VSAM depending on shop.
If you ignore it, the next WRITE/READ can S0C4 and you will not know why.
Put the status check in a copybook paragraph and call it after every I/O. Saves repeating IF logic everywhere.
You must be signed in to reply to this thread