|
I don't think so. I tried that and RPG ran about 15 times faster. Tom -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Barton, Mike Sent: Thursday, December 15, 2005 6:51 AM To: RPG programming on the AS400 / iSeries Subject: RE: Updating a Program using SETLL/READPE - Suggestions > Hi All, > > We have a PF that has over two million records in it (and it grows > daily), that uses a SETLL/READPE command. I know there has been much > debate as of late on the use of these commands, and I wanted to > present a bit of could for your perusal and suggestions. Right now, > the system is very slow at updating records (sometimes in excess of > five minutes), and I suspect it has something to do with this code: > > #SRUPD BEGSR > TIME TIME6 6 0 > *(SST22) > KEYT22 SETLL SST22 > > *IN99 DOUEQ *ON > KEYT22 READE SST22 99 > 99 LEAVE > MOVE '1' SRADNF > Z-ADD *DATE SRADDT > MOVEL TIME6 SRADTM > UPDATE RSST22 > ENDDO Hi the code appears to update all matching records to key KEYT22 with Date & time plus some other flag. The reason it may take along time is as you say, there are a large number of matching records to update in one go. Embedded SQL may perform better & is worth a try. HTH Mike
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.