You really need to fix the program(s) holding the record lock.

Read with lock
Display
Update

Has been a bad idea since RPG existed.

Read w/o lock (and save)
Display
Read with lock
Compare to Saved version
If unchanged, update with users changes

This way the lock is only held for nanoseconds...

Charles

On Sat, Jun 14, 2025 at 7:15 AM john art <jhon_art@xxxxxxxxxxx> wrote:

We have some RPG programs to menage a B2B site; some times happend, for
lost connection or other situation, that the web connection go down, but
the Ibm i job remains active and with him also some record locks, so when
the user try reconnect , receive error “record already allocated by another
job”. I was looking for an example that in this case , let to the rpg
program , when receive that error (“record already allocated by another
job”), to automatically kill the job that locks the record.
Thanks in advance
P.S. also other suggestions are welcome

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.