When program is called, it first generates a list of records (reply) and then starts sending them back to the caller one by one. It is a predefined logic, works fine.
Now one of our programs of this sort has a bug, that we are searching for a couple of weeks but with no success. As a result the program crashes and the file QTEMP/TEMPFILE left open.
When program is called next time, the file opening command with clearing file content (option "wr") fails because the file is being held by someone. This someone is probably the crashed previous instance....
So from that moment the program works, in the sense that it consumes resources, but does not do what is intended.
Is there something, that can be done inside our program to take care of this situation? Close the file somehow if it was left open or something alike?
I am (of course) not losing the hope to find the original bug, but have no idea how to proceed.
Advise will be highly appreciated :-)
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.