×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Scott,
I double checked and I am sure the file is being closed. I follow the standard open, close, then open again to set the code page. This code was copied from an existing program and I confirmed it works. I have used debug to be sure the file is closed at the end of the process. That should match up the opens and closes.
You did get me thinking that I may be looking in the wrong place though. I have been focusing on closing the file and maybe I should be looking at the open. Maybe I'm executing the create file procedure multiple times and opening multiple pointers. I'm going to run through debug this morning and check that out.
Thanks for the reply.
Rick
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Wednesday, December 03, 2008 4:43 PM
To: Midrange Systems Technical Discussion
Subject: Re: IFS file stays locked after close
Hi Rick,
Is it possible that you opened the file twice, but only closed it once?
Or perhaps you ran the program the first time, and the program crashed, leaving the file open? The second run opened the file a second time, and then closed it successfully, but the original run still has the file open?
OR some similar idea? (Like an IF statement that ends the routine prematurely because of some condition -- but forgets to close the file.)
Basically, there are a million variations on this... but they come down to the same thing. Every successful call to open() must be followed by a corresponding successful call to close(). If for any reason one of those closes is missing -- even if subsequent ones are closed successfully -- the file will remain open and locked.
Rick.Chevalier@xxxxxxxxxxxxxxx wrote:
I have a situation in an interactive program where the file appears to be locked even though the program has ended. To free the file I have to sign off. I verified that the close operation is performed and the return code = 0 so I think it should be closed. Searching the archives, Google, and Info Center didn't turn up anything useful. I did try adding the fsync function call in case it was an issue with the buffer not being flushed.
Does anyone have any ideas?
Rick Chevalier
Privileged and Confidential. This e-mail, and any attachments there to, is intended only for use by the addressee(s) named herein and may contain privileged or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited.
As an Amazon Associate we earn from qualifying purchases.