Releasing lock in AS/400

470 pts.
Tags:
AS/400
AS/400 administration
AS/400 DB2
AS/400 Locking
how to find which record is locked and who locked that record.how to release the lock by ourselves.please explain in detail.i'm new to as/400.

Answer Wiki

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

interactively you would use the command dsprcdlck
this will prompt you for the file name
you will need to end any jobs that are locking the record in question.
Phil

Discuss This Question: 5  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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    how to find which record is locked... That's an unusual question since a program usually already knows which record it's processing. However, you might be asking about SQL mass updates or some similar process that operates on sets of records. Can you explain why you asked? how to release the lock by ourselves. That's easy. Run ENDJOB against the job that has the lock. Unless all of your programs are written to respond to requests from other jobs, ending the job that is holding the lock is your only option. Tom
    125,585 pointsBadges:
    report
  • Kaly
    sir thanks everybody for answering my question. i still have some doubts,if i'm accessing a record for updating and another user is also trying to access the same record for updating at the same time,that record would be locked no at that time what he shall do to release the lock or has he has to wait till i finish updating,wrkobjlck command what it is used for.thanks gentlemen in advance.
    470 pointsBadges:
    report
  • Abigail
    Whenever possible, instead of ending any jobs, locate the record lock user ask them to complete the update and explain what adverse affect it has on the system and other users when a record is left open. Once the record is updated and released for another transaction, you may need to reply to an object lock message if the program(s) requires this. Normally, entering a retry will work but you will want to check with your developer's for valid replies to ensure successful processes. We have found that as we educate our users rearding this locking situation, our locking errors have decreased substantially.
    645 pointsBadges:
    report
  • Znason
    Hi... Is this an interactive job? On interactive jobs... sometimes a developer will not relases a record prior to returnig a display of that record to the enduser. The record is locked... the enduser is in "think time"... not knowing that while he/she is thinking... the record is locking others from updating. The application needs to verify that during the user "think time"... that the record may have been updated. And needs to be redisplayed for verifcation. Make sense?
    460 pointsBadges:
    report
  • TomLiotta
    if i’m accessing a record for updating and another user is also trying to access the same record for updating at the same time,that record would be locked no at that time That is correct. what he shall do to release the lock or has he has to wait till i finish updating, We can't tell what a user has to do to release a lock because we don't know what programs are being used. In general, programs would be written to allow some kind of exit or cancellation. Usually, the F12 key would start a cancellation, but that is determined by how the developer wrote the programs. wrkobjlck command what it is used for. The WRKOBJLCK command is used when you want to check to see if an object has any locks associated with it. It tells you what kinds of locks have been set and which jobs have those locks. The command isn't used in programming much. It is generally used by administrators during investigation of problems. When an RPG program runs into a lock condition, you can retrieve information about the lock from a number of sources. The sources will depend on how you coded the program. For example, if you coded for a file information data structure (INFDS) and a program status data structure (PSDS), you could check the *STATUS to see if it was '01218'. You could check the exception data in the PSDS to find out about what job held the lock. That information could be displayed to the user. A trivial example of one way to catch lock errors (see figure 132)... some information on the file information data structure (INFDS)... and info on the program status data structure (PSDS)... Tom
    125,585 pointsBadges:
    report

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following