Locking in AS400

115 pts.
Tags:
AS/400 Locking
AS/400 Troubleshooting
COBOL
ILE COBOL
Good day, I hava a process in as400 system that locks if 2 users enter the application at the same time. I thought that once it is out of System-36 and becomes ILE Cobol, locking would be resolved. I was wrong. This is what it does: 1. File is read and data presented on screen (database file). 2. User can add a record to database file or change record. Even when the screen is presented for the first time (that is no update is yet taking place) if the second user enters the same screen, he/she will be locked. I have a "read with no lock" coded in the program. What should I do to avoid locks? Thanks, Lenny

Answer Wiki

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

Cobol isn’t my bag but the problem is common.

In RPG a Read no lock will encounter an error when another job has the record locked —
— not cool but that’s the way it works.

Start your program from job a. While it’s on the screen use another session with WRKUSRJOB
1. DSPJOB .. check locks – it may be locking a data area or other objects with excluse rights
2. DSPRCDLCK for the file in queston
– you may have a Read – No Lock but you maybe using another read
– you may have a level of commitment control on the file which locks all records used.
If you don’t discover something helpful start the second job
From a third session look at the
– job log of the second session .. what went wrong
– at the files – how many reads from the file occurred – how many writes to the screen, etc.

Good luck
Phil

Discuss This Question:  

 
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

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