× 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 it's moving/saving of the input fields you're calling a pain you could
make life easier by using data structures defined with the keyword
LIKEREC(*INPUT/*OUTPUT).  From your posts, the input and output files have
the same format and field names thus something like so would work.

d InputDs     ds        likerec(*INPUT)

 /free
    read InputPf InputDs;
    dow not %eof(InputPf);
      write(E) OutputPf InputDs;
      if %error;
         chain %kds(KeyDs) OutputPf;
         update OutputPf InputDs;
      endif;
      read InputPf InputDs; 
    enddo;
 /end-free

HTH,
CHarles


> -----Original Message-----
> From: Lim Hock-Chai [mailto:Lim.Hock-Chai@xxxxxxxx]
> Sent: Thursday, April 29, 2004 3: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.