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



I needed this for our billing process that processes massive amount of data. It is a multi threaded process. Each thread processes customer that is next in line to be billed. We've encountered problem with each thread encountering record lock with each other. Now, it theory, that is not possible because each thread processes different set of customer info. But remember this little note about READE from the RPG reference manual:
Note: If a file is defined as update and the N operation extender is not
specified, occasionally a READE operation will be forced to wait for a
temporary record lock for a record whose key value does not match the
search argument. Once the temporary lock has been obtained, if the key
value does not match the search argument, the temporary lock is released.

Yeah, above is what is causing each thread to encounter record lock with each other. So, we now need to change all the READE to READE(n) and then lock for update if necessary. We need to do this to all programs that are being called in this billing process.



"Florin Todor - YYZ Concord" wrote in message news:mailman.561.1330702890.14575.rpg400-l@xxxxxxxxxxxx...

Why don't you reed it with lock first and if you don't need to update
it, unlock it?


Thank you


Florin Todor


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Hockchai Lim
Sent: Friday, March 02, 2012 10:13 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re-READ the current record

Is there a way to re-READ the current record (without using CHAIN) that
the
RPG program has just READ?

For example:

reade(n) (mykey1) MYFILE; //read it with no lock
if not %eof() and needUpdated();
==> Need to re-read with locked how???
endif;


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.