Skip to main content

[Migrated content. Thread originally posted on 30 November 2011]

I have a situation that occurs intermittently where the CBL_DELETE_FILE returns a 9/029 error (Attempt to delete open file) on a sequential file that is not supposed to be open. I suspect that the file is either locked by another process or the operating system is not letting go of the file quick enough. This problem has just started happening on code that has been in use for over 10 years so I do not think there is a problem with the code or function.

Are there any utilities that could identify what process has the file locked or that could provide any other information that may be helpful that can be called from within COBOL and can be executed at the time the error occurs? The code is compiled under NetExpress 5.0, I am operating in a Microsoft Windows network environment and I am not using FileShare.

[Migrated content. Thread originally posted on 30 November 2011]

I have a situation that occurs intermittently where the CBL_DELETE_FILE returns a 9/029 error (Attempt to delete open file) on a sequential file that is not supposed to be open. I suspect that the file is either locked by another process or the operating system is not letting go of the file quick enough. This problem has just started happening on code that has been in use for over 10 years so I do not think there is a problem with the code or function.

Are there any utilities that could identify what process has the file locked or that could provide any other information that may be helpful that can be called from within COBOL and can be executed at the time the error occurs? The code is compiled under NetExpress 5.0, I am operating in a Microsoft Windows network environment and I am not using FileShare.
I've used "Process Explorer" and its "Find handle or DLL" feature.

technet.microsoft.com/.../bb896653.aspx