Batch Files – Record Locks

Tags:
AS/400
Record lock
What is the most proficient technique to eliminate the record lock errors in batch processing?
ASKED: November 1, 2007  5:22 PM
UPDATED: February 19, 2010  5:21 AM

Answer Wiki

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

Walter47 | Nov 2 2007 3:41PM GMT

My first guess is that something has precedence. An ovrmsg msgid (PFxxxx) would do it.

Jack

============================================================

There are only two rational alternatives. First, stop locking records while batch processes are running. Second, change the batch processes so that they handle the locks — retry until the lock clears, send messages to someone who will take action or have the batch job end the offending job.

Maybe simplest is to have the batch jobs allocate its files with an appropriate locking level, e.g., *EXCLRD. Other processes could still inquire, but none would get update locks. The batch process would know at the start if other processes already had potential for interference.

By issuing ALCOBJ at the start, very little change (if any) would be needed internal to the batch process. The allocation could be made in a wrapper that was entirely outside existing batch programming.

But a real answer requires an understanding of what is meant by “proficient” in your question. It also requires knowing something about your batch process.

Tom

Discuss This Question: 2  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
  • Walter47
    My first guess is that something has precedence. An ovrmsg msgid (PFxxxx) would do it. Jack
    120 pointsBadges:
    report
  • ITKE
    Jack Thanks for all your answers. Sean
    56,495 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