|
You may find that you'll need to create additional logicals to speed things up. For example, not having all of the key fields you need in a logical may mean reading a lot more records than you need to (particularly if you only read certain files when particular field values change). Also, if you use OPNQRYF and don't have an appropriate logical file, the system may be creating one on the fly which can take a long time on a big file (there was a process here that we shaved an hour and a half off of just by creating a logical file). What you really need to do is figure out what parts of the code take the longest. Writing out the execution time of the various routines to a log file of some sort will help figure that out. You may find that a particular routine is being called more often than needed or that you're chaining to a particular file more frequently than you need to. One thing that we've done here with these types of problems is to have a peer review of the code for the entire job. That's how we found that the logical mentioned above was needed (we also found several simple things that shaved a bunch of time off the job). If you do one of these, try and gather the timing information and have a job log available. In our review, we also had source code print-outs available (both code and files) as well as a projector. Matt -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Tony Carolla Sent: Friday, January 27, 2006 11:39 AM To: RPG programming on the AS400 / iSeries Subject: Re: long running RPG program I would first look at the disk I/O. Is the program reading a huge number of records, or CHAINing/READEing a high number of times. Just a thought -- slow runtimes are often due to extensive DB lookups. On 1/27/06, steema@xxxxxxxxxxxxx <steema@xxxxxxxxxxxxx> wrote: > > HI I am looking at a program that takes several hours to run. I am looking > for some obvious signs. For example this routine, is there > a better way to determine if the year on the record is what we want: > > L1 BCBNYR IFGE 97 > L1 BCBNYR ORGE 00 > L1 BCBNYR ANDLE40 > L1 EXSR SRBINV > L1 EXSR SCBJ1 > L1 END > > this loop occurs in a few places. > > Also there is a SCAN in a few as this: > > C BDINV# SCAN JBCMNT 60 > C *IN60 IFEQ '1' > C KEYJ1 CHAINOCPJ1 33 > C *IN33 IFEQ '1' > C JBDIV ANDEQ'07' > C MOVE '08' JBDIV > > > Perhaps these are slowing things down, I can't exactly tell. > > THanks, > Steve > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > > -- "Enter any 11-digit prime number to continue..." "In Hebrew SQL, how do you use right() and left()?..." - Random Thought "If all you have is a hammer, all your problems begin to look like nails"
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.