How can i release the lock on a AS/400 file

20 pts.
AS/400 security
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:

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi Sreeraj,

How one can find out what is causing a lock you should do the following:

1) Before your job place 5
2) Choose option 12
3) You will see a list of all objects used by you
4) If there are any objects showing member locks “YES”
5) Type 8 in front and find out which file is being locked by whom.
6) Contact the owner of the file that’s causing the lock if present to find out more or if it’s a job that runs daily there is no other option then to wait until that file has been released.

If this answers your question then it’s O.K.

Good luck!


The lock is under your profile
DSPUSRJOBs – if you have any batch jobs running they maybe creating the lock
Signoff interactive jobs to release the locks.
The program that you are running isn’t closing the file or setting *INLR on


The establishment of the lock might have come from calling a program that created an activation group that hasn’t been reclaimed — regardless of *INLR on or off.
Or take option 18 from the DSPJOB menu. You might be able to RCLACTGRP for ones that you know can be reclaimed.

A more intense option is to try RCLRSC if you can’t see any activation groups that might be an issue.

Have the file opens and closes journaled for a while if you’d like to track down whatever might be involved.


Discuss This Question: 8  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Sreeraj
    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.
    20 pointsBadges:
  • Whatis23
    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.
    5,665 pointsBadges:
  • TomLiotta
    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
    125,585 pointsBadges:
  • mcharles01
    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...
    30 pointsBadges:
  • mcharles01
    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
    30 pointsBadges:
  • mcharles01
    I dont know how to find the file mine is the only Batch???
    30 pointsBadges:
  • TomLiotta
    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
    125,585 pointsBadges:
  • ToddN2000
    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.
    102,270 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: