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



Lim,

Do you have a unique key on MYFILE (something more than mykey1)? Your reluctance to use a CHAIN sort of implies that you don't.

If you do have a unique key you could use an embedded SQL UPDATE statement to change the record. Then you don't have to lock the record with another read or a chain.

Another alternative is to write the updates out to a holding file. You then apply these updates back on to MYFILE after the billing process is completed. Again, you'd need a unique key in the hold file to get back to the right MYFILE record to update.

In the absence of a unique key you could use the relative record number as a substitute key as others have suggested.

Thanks,
Paul Morgan

Principal Programmer Analyst
IT Supply Chain/Replenishment

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

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.