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



If you read a record in an update capable file, it will be locked assuming you don't use the no-lock extender.

Another process trying to read that record will wait until the timeout (WAITRCD value on the file) and then throw a message. Of course, you can monitor for that in the program.

You'd probably want to have a short RCDWAIT value - default is 30 seconds, I believe. DSPFD will tell you.

I *think* this addresses your concerns?


-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of James H. H. Lampert
Sent: Wednesday, October 17, 2018 5:03 PM
To: RPG programming on the IBM i / System i
Subject: Exclusive locks at the record level?

I've got a project, where I'd like to have a bunch of parallel batch
jobs behaving thusly:

All of them are running through the records of a file, in RPG, executing
"process x" (involving a single-record web service that takes time to
process the record it's fed, apparently well beyond the time needed to
transport the data) upon them.

I know we have exclusive locks at the file level, but I can't remember
whether or not we have it at the record level, in a form that can be
used in RPG, with native record-level access.

It would be nice for each of these parallel jobs to be able to simply
grab the next record that isn't already done, and isn't already being
processed by a sister job.

Am I making any sense here?

--
JHHL

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.