× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Sounds good to me. And it has the added advantage that the program will continue immediately the lock is released rather than waiting for up to 20 seconds doing nothing.

Sam

On 11/1/2023 12:48 PM, Dan wrote:
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 thread ...

Replies:

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

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.