Record lock

295 pts.
I have ecounter a situation where my program is updating a record which is locked by another user. Can anybody suggest on developing a process using CL program which can handle such kind of situation where my CL program will send a message to the user who has put a lock and after waiting for some time my rogram should again fire update command from COBOL/400 program. Thanks in advance.

Answer Wiki

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

I have an old RPG example that uses a CL to send a message to the user locking the record.
If you are interested, shoot me your e-mail and I’ll send the code.
Even though its old, it will give you a good idea of what can be done.

Discuss This Question: 6  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.
  • Vids
    yes please. my email is Thanks
    295 pointsBadges:
  • Alicsc
    Hi, Pls send me the code to me also.My Email Id is
    370 pointsBadges:
  • Cwc
    Here are some other ideas and techniques. The example RPG code at the link below is old, and could be implemented today in /Free without numbered indicators, etc., but illustrates the approach. I like the idea of displaying a window informing the user who needs the lock that someone else already has that record locked. And ideally, a message could also be sent to the user who has the lock, to inform them that someone else needs it and to ask them to please finish their work on that record and to release it, etc. And this one has a link to some code that can be downloaded.
    4,290 pointsBadges:
  • TomLiotta
    If it's an ODBC process holding the lock, how will you send the message? If it's a batch job holding the lock, how will you display a menu? If you don't have authority to the offending job, how will you do anything at all with it? Why is your job more important than the job holding the lock? What if no one is at the workstation? In short, the lock isn't the problem and sending a message won't solve it on an ongoing basis. The problem is the design of the application -- it shouldn't allow standing locks in the first place. Eliminate the locks; don't just complain (message) about them. Tom
    125,585 pointsBadges:
  • Splat
    WoodEngineer, if you would be so kind as to also send me a copy of your CL it would be appreciated. My address is atroxdesign {at} swbell {dot} net.
    12,915 pointsBadges:
  • Yorkshireman
    You need a design level standard Don't lock the record. Don't ever write anything that locks a record - ever. Except just before you update it. read and display read and display decide an update is needed read the record for update (lock) check it hasn't changed since you displayed it ( tell the user if so) update it release the lock read and display read and display blahblah
    6,085 pointsBadges:

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.


Share this item with your network: