I want to clear one file. But the message says that it is under use. The lock is under my profile but I am not using the file at that point of time. As of now I am killing the session and releasing the file. Have any one experienced this before? Can any body help me?
Software/Hardware used:
AS400
ASKED:
August 28, 2009 5:55 AM
UPDATED:
October 16, 2009 12:05 AM
Hi Roy,
Thanks for ur reply. Actually i had already done WRKOBJLCk on it and found out that the file was locked by my profile itself. But I was not using that file at that time , not running any jobs also. Still it shows that the file is locked. this happens right after running a particular program in my profile. But program successfully came out after running . but files are not getting released.
If the file was opened by the OPNDBF or OPNQRYF commands, the Close File (CLOF) command will close a database file opened with those commands. Try this to release the lock.
Try a basic RCLRSC to force files to close.
Note that this should only be done if you’re sure the file doesn’t need to be open. There might be an activation group that expects the file to remain open. There might have been a trigger program that expects the file to stay open. There might be an exit program registered against any number of system exit points that expects the file to stay open.
There shouldn’t be functions that leave files open when you need to establish locks on the files in other functions. Either the file is left open by mistake or you shouldn’t be locking it. Either way, something needs to be fixed.
Tom
I am in need of help desperately. AS400 trying to invoice when I go to update says someone is currently running post. there are no other batches. Will not update. Did dspmsg no message waiting…
Please help… I am trying to bill in AS400 and when I go to update/post invoices it says someone is currently running invoice post. Cant find who is in it ….
Thanks
Michelle
I dont know how to find the file mine is the only Batch???
We have no clue what programming you are running, so we could only try various guesses. From the way you word it with “someone is currently running [post]“, I’d first think in terms of something like a master control record or data area that has a ‘flag’ value. I can’t guess which it would be nor how to track it down. There is also a possibility that some object is locked by your programming whenever a “post” is run. But a lock might be established in a variety of ways, e.g., simply by running ALCOBJ from a command line. IOW, it might have nothing to do with a “post”. Of course, a control record or data area ‘flag’ value can also be updated in various ways, but it usually takes a more deliberate action. Not a lot more can be said without a much more complete description of the application. — Tom
Is it possible a job did not complete normally ? Some jobs set a flag to prevent duplicate jobs from running. If it say you have file locked even after logging out and back in again you may have a “Phantom Session” that did not complete. I may not show under WRKACTJOB so check it out using Operations Navigator, work management, active jobs. Look for your job it may have a status of suspended or some thing similar. You may need to end that one. If you still cannot run the job, check with a programmer as to why or contact the software provider for help on the issue.