× 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.



Hi Dan,

One thing about having the wait loop in the RPG code is that it is very
clear what is going on.

Although I would change it to use sleep as Jon suggested.

Just my 2 cents

Cheers

Don





From: "Dan" <dan27649@xxxxxxxxx>
To: "RPG programming on the IBM i (AS/400 and iSeries)"
<rpg400-l@xxxxxxxxxxxxxxxxxx>
Date: 02/11/2023 02:48 AM
Subject: Record lock question: WAITRCD override or loop w/ nn
retries?
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx>



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 ...

Follow-Ups:
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.