Command to Handle Object and Record Locks PRCOBJLCK

So, your nightly backup or other important job is running and boom, a message arrives on the QSYSOPR message queue that the job has encountered a record allocation or object allocation problem, because some other job is holding a lock on the record or the object you need. You do a WRKOBJLCK (Work with Object Locks) command to see who has it, and send the offending user a message or kill the offending job so the important job can run.

Carsten’s command in this issue will do all this for you. The Process Object Locks (PRCOBJLCK) command identifies all jobs currently holding a lock for the specified object, and for each job, it either sends a break message or ends the job. The break message is sent to the job holding the lock or optionally to all jobs currently running under the user profile of the job holding the lock.

Download the save file containing the source code.

Read the entire article

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s