Record locking in iSeries

425 pts.
Tags:
AS/400
AS/400 Records
Record lock
RPG Record Locks
My program takes the input as file, and process those records one by one. Here I would like to add the commitment control, if any one record fails then roll back and continue with the next record. To test this, I need to lock the record in another session and to run the program to check the ROLBK. How to lock the record? I tried with UPDDTA and its not locking the record. So now I have written a record locking program to lock the required record when testing. Is there any other way to lock the specific record?



Software/Hardware used:
Iseries

Answer Wiki

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

STrSQL
Options (F13) set commitment to *all
Issue a select for the record.
Remember that before you leave SQL do a commit and change the commit option back to *none
Phil

Discuss This Question: 1  Reply

 
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
  • Kar
    Thanks a lot Phil, it worked..!
    425 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