Recently one of our Windows customers encountered a situation where a couple of IS1 files were completely empty and had a Size of 0. (Essentially the same as a text file with no data.)
We don’t know how the IS1 files got to that state, but when it occurred an attempt to open the ISM file generated an Error 18 (File Not Found). Based on the error, our program then proceeded as if the file didn’t exist, which in this case entailed creating a new file and then processing as if everything was OK.
Since both the ISM and IS1 files did actually exist, I think the Error 18 was misleading and believe some other error should have been generated indicating ISAM file corruption.
Similarly, I have tested to see what happens if an IS1 file is missing completely, and that too generates an Error 18. While that result is more defensible it is still misleading, as the lack of an IS1 file when an ISM file exists would also signal a form of ISAM file corruption that programmatically should NOT be treated the same as a missing ISAM file.
So, my idea is to no longer generate an Error 18 in the 2 circumstances outlined above, and instead generate a new error code indicating ISAM file corruption.
In our case, it took over a day to unravel all of the problems created by receiving an Error 18 and processing as if the file did not exist. But we were lucky, it could have been worse.
I have presented this to Synergex Support, and the response from Development was "It seems the changes that need to be made would be quite significant and not just a handling of the error message. Therefore, it is their position that this be placed in Ideas to see if this situation warrants a deep dive into finding a solution."
So hopefully there are some others who share my concern and feel that receiving a File Not Found error when a file actually exists is something of a problem.