We have an automated process which runs in the background processing files (using Extend 9.1 on Windows). As each file is processed, many Vision version 5 files are accessed, and many Cobol programs called from an object library (called OMICS7).
After approximately 6500 files are processed, the runtime crashes with a file error 94,10 - which indicates the session is out of file handles. The customer is running on Windows Server 2008, but the same behaviour exists on Windows 10 Pro.
We use a config file for the runtime, and the exact same behaviour occurs when MAX-FILES is set to 256, and when set to 16000.
Using a Process Manager to monitor file handles, when the file error 94 is raised, we see many (approx 2000) file handles open for the object library (OMICS7). Curiously, we do not see these file handles earlier in the process, when only 3000 files have been processed, for example.
We've examined the Cobol code in depth and are satisifed that programs are being correctly canceled, files being correctly closed, etc.
1) Does a file error 94 indicate no more FILE HANDLES as specified in MAX-FILES?
2) Does opening a bitmap image in a program count as a FILE HANDLE? We use DESTROY to close these, but do we also need to CANCEL the call to W$BITMAP?
3) Is there any detail somewhere that could tell us more specifically what "counts" as a file handle for purposes of the file error 94, and how we can monitor those?
Any other suggestions re the file error 94 would be appreciated!