5 pts.
 AS400 record lock
I have a issue with a record lock. One of the user has locked and updated the record. He has signed off from the system. I want to update the same record but an error message is displayed saying the record is still locked. Kindly help.

Software/Hardware used:
ASKED: June 1, 2010  5:14 AM
UPDATED: October 6, 2011  7:27 AM

Answer Wiki:
If the user has signed off, he cannot still have a lock on the record as all locks are released when a job ends. DO a WRKOBJLCK to determine which job is locking the record. Then you can determine where the real lock is. If a user has just timed out and not signed off, he can still hold the lock. You would need him to sign back on and then do a SIGNOFF. If that is not possible, you cna do ENDJOB *IMMED for the job that has the record lock.
Last Wiki Answer Submitted:  June 1, 2010  4:49 pm  by  CharlieBrowne   33,695 pts.
All Answer Wiki Contributors:  CharlieBrowne   33,695 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Are you still getting the error message??? Please tell use the message.

 44,630 pts.

 

If you cannot end the job normaly you may to to do an ENDJOBABN.
We sometimes have a “phantom” job that just wont end or free up the resources.

But see if that is the actual user who has the like with th WRKOBJLCK as mentioned above and let us know.

 4,115 pts.

 

You need a design level standard

Don’t lock the record.

Don’t ever write anything that locks a record – ever.

Except just before you update it.

read and display
read and display
decide an update is needed

read the record for update (lock)
check it hasn’t changed since you displayed it ( tell the user if so)
update it
release the lock

read and display
read and display
blahblah

 5,505 pts.