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

You could chain into a data structure and/or write from a different data 
structure to keep the field names separate.  I don't know how long this has 
been available but it has really come in handy for me recently.

This example is from a working program.  You can substitute CHAIN and WRITE for 
the READ and UPDATE.

d LnpaufIn        ds                  LikeRec(LFFEER :*Input)  
d LnpaufOut       ds                  LikeRec(LFFEER :*Output) 

// Read the input record
ReadE(E) %KDS(LNPAUFKey :2) LFFEER LnpaufIn;

//Update record 
Update LFFEER LnpaufOut;

HTH,

Rick

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Lim Hock-Chai
Sent: Thursday, April 29, 2004 2:12 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Slow respond time when file change to open with update&Add


Want to also mention that, I tried the unique key method again with the input 
file open as key access and here is the result:
2a) Ran for 13 mins ( 407 secs of processing unit time): Input file opened as 
(IF K), outfile (UF A) Unique.  (Chain and update if write failed) 

Seems like sequential access on input file also help increase the speed.

Do want to mention that the unique key method might cause longer respond time 
if the outfile contains a lot of duplicate.  Because to use this method, when 
write failed, the program has to save all outfile fields data to a save data 
structure first, do a chain, move the saved structure back to the fields in the 
outfile and then update.  (what a pain).



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.