|
Mark and Lim, Is it possible to save a little time by doing a SETLL and testing for an exact match? As I understand it, it would save time because the record is not read into memory and then moved field by field to the program. Then if there is an exact match a read will get the record into memory and allow an update. Just a thought, amoung the few I get far too seldom. Marvin Rading ------------------------------------------------------------------------ ----------------------------------- Lim, You mention the "only" logic change is for a chain to the outfile, then update or write as appropriate. The time increase is right there, your disk I/O has just doubled, so has your time. Record blocking cannot do much for you, since you now will update or write a record based upon only one record at a time. If you business requirements are forcing the need to do the chain, and do an update or add, then you are stuck with a longer running program - those disk heads are very busy. If you are flexible in your business requirements, change back to just writing records. HTH Mark -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Lim Hock-Chai Sent: Wednesday, April 28, 2004 4:09 PM To: rpg400-l@xxxxxxxxxxxx Subject: Slow respond time when file change to open with update&Add I created a RPG program that reads an input file that contains about 2.5 mil+ records and write them to a output file if they meeting the criteria (about 1.2 mil+ records). 1) It took about 35 mins to run when the input file is open as Input only with sequential access (No Key). The output file is open as output only. 2) It took about 70 mins to run when the program is change to open the input file as Input only with key access and the outfile as Update & Add. The only logic added to the program is it do a chain to outfile, if %found, update, otherwise write. I think the increase of processing time on 2 is cause the outfile open as Update&ADD, which cause the program to not do record blocking when write to outfile. I got several methods in mind that I can think of that might speed up 2. However, just wonder if anybody has had the same problem before and know a good method to speed it up. thanks
As an Amazon Associate we earn from qualifying purchases.
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.