|
Brian, There has been a lot recently on the performance of READE that you can find in the archives so I won't duplicate that. I would like to suggest changing the line where you populate the date. I haven't tested this theory and it may be a bit of a reach, but then, maybe not. The date BIF's can be slow when used over a large number of records (for my testing I was using a file with > 350 million). Using the _old fashioned_ methods of working with dates (data structures, move, etc.) was much faster. Here's the leap. On the theory that *DATE may be retrieving the date for each record, much like %DATE would, try changing the subroutine to retrieve the date at the beginning like you do the time. Then move that value into the result field for each record. Like I said, this theory hasn't been tested so I may be all wet. Rick -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Brian Piotrowski Sent: Wednesday, December 14, 2005 10:09 AM To: RPG programming on the AS400 / iSeries Subject: 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 The key on which the system uses is based on a Physical File, and not a Logical File (SST22 is a PF). Anyone have suggestions on how I can improve / optimize this code to reduce the wait times in this area down to something significantly less than five minutes? Thank you! Brian. -=-=-=-=-=-=-=-=-=-=-=-=-=- Brian Piotrowski Specialist - I.T. Simcoe Parts Service, Inc. PH: 705-435-7814 FX: 705-435-6746 -=-=-=-=-=-=-=-=-=-=-=-=-=- Privileged and Confidential. This e-mail, and any attachments there to, is intended only for use by the addressee(s) named herein and may contain privileged or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited.
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.