AS/400 – Chain file

1215 pts.
Tags:
AS/400 Records
AS400- File
Record lock
RPG Record Locks
I wanted to do Chain Kfld File1 If Found And Fld1 = 'Y' Update File Else Perform Next Chain Operation Endif Here I wanted to perform the Chain without Locking the Record. I wanted to perform Update Operation without Performing Read/Chain again if the Condition is True. How to achieve this?

Answer Wiki

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

Take a look at Chain(n). N modifier doesn’t lock the record.
Another way is to use SETLL and READ in a loop and when you found your record proceed to use the CHAIN method for update.

Regards.

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
  • TomLiotta
    I wanted to perform the Chain without Locking the Record. I wanted to perform Update Operation without Performing Read/Chain again if the Condition is True. Those two are mutually exclusive. How to achieve this? You can't. The update operation must lock the record. The whole database system would be impractical if it didn't. Tom
    125,585 pointsBadges:
    report
  • PGMBOB
    If you update, you need to chain or read with a lock. Perhaps you want to unlock when you do not update? Then you will leave no record locked where you did not update. Good Luck
    1,160 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