Record lock, READ(E), and %ERROR

55 pts.
Tags:
rpgle read(e) %error

Trying to handle a RECORD LOCK


I have a READ(E) set with a %ERROR but the record still locks and will not drop into the IF %ERROR routine.

READ(E) PRODUCT

IF %ERROR AND %status = 1299

and I have tried the following

READ(E)   PRODUCT           
IF        %ERROR             
          

0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 3  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.
  • ToddN2000
    Is this file going to be updated in the program? If not check to see that the F spec has it defined as input only. When you do get the record lock, check to see if it's your program that actually has the lock.  We have issues on occasion whet someone will pull up a record for update and the get called away for some reason. This lock the record from all other users. 
    134,495 pointsBadges:
    report
  • ToddN2000
    You can verify the user who has the lock by signing on to another session and use the command 
     WRKOBJLCK OBJ(MYLIB/PRODUCT) OBJTYPE(*FILE). 
    134,495 pointsBadges:
    report
  • Amjim

    This submitted (BATCH) program will 'update' the record when needed and the lock is happening from another user with another program having it locked.

    I was just surprised the READ(E) will not handle it.

    55 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.

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

Following

Share this item with your network: