|
I’m reviewing an old RPGLE batch program that has logic to retry a CHAIN on
an update file whenever the CHAIN fails because the record is locked by
another job. It uses a loop to wait 20 seconds and retry the CHAIN, and it
loops ten times. And I’m left wondering why one wouldn’t just override the
WAITRCD value for the file before opening it. We use the system default
WAITRCD(60), so the logic currently waits 80 seconds in total (60+20)
between each attempt, and gives up after 800 seconds. Is there a good
reason why overriding with WAITRCD(800) and doing away with the current
loop logic wouldn’t be a better option? I’m going to guess that the
original developer wasn’t aware of files’ WAITRCD attribute.
(And, yes, the logic does process the error after exiting the loop.)
- Dan
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.