|
If you are using READE, then I think your PF must be keyed, which is just as good as having a logical file. Check the source on your PF. As far as indexes go, if you are creating a new logical file, you have to actually name that logical file on the F spec in your RPG program and refer to it in your C specs. If you are talking about an SQL index, that's another matter with which I'm not very familiar, but I think that Embedded SQL would probably pick it up right away, but your regular RPG program won't use it at all. It only uses what you tell it to use. On a wider note, it sounds like you are trying to improve performance. I've been preaching here a couple times in the last few weeks about the hazards of using READE over a large data set, since it doesn't read from a block of records in memory, but actually hits the file for every read. If performance is an issue, much better to setLL on your key, then use READ, and compare your records to your key fields with a few more lines of code. It's uglier, but it goes faster. >-----Original Message----- >From: midrange-l-bounces+gfleming=evergladesdirect.com@xxxxxxxxxxxx >[mailto:midrange-l-bounces+gfleming=evergladesdirect.com@xxxxxxxxxxxx] On >Behalf Of Brian Piotrowski >Sent: Wednesday, December 14, 2005 10:38 AM >To: Midrange Systems Technical Discussion >Subject: Usage of Indexes and its Effects on an RPG Program > >Hi All, > > > >I have a physical file that has 20 fields and contains over 2,000,000 >records. In the current RPG program, it does a SETLL/READE on the data >based on a key (which is the first five fields in the record). However, >the READE command does not have an associated logical file - it is using >the straight PF (this program was written before my time, and I suspect >does not run as efficiently as it should). > > > >I went into the system (via Navigator) and added an index to this PF of >the fields that are in the key. Now my question: when a new index is >created on a physical file, will an RPG program begin using it >automatically, or does the program need to be made aware of the index? > > > >Thanks! > > >Brian. > > > >-=-=-=-=-=-=-=-=-=-=-=-=-=- > >Brian Piotrowski > >Specialist - I.T. > >Simcoe Parts Service, Inc. > >PH: 705-435-7814 > >FX: 705-435-6746 > >-=-=-=-=-=-=-=-=-=-=-=-=-=- > > > >-- >This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list >To post a message email: MIDRANGE-L@xxxxxxxxxxxx >To subscribe, unsubscribe, or change list options, >visit: http://lists.midrange.com/mailman/listinfo/midrange-l >or email: MIDRANGE-L-request@xxxxxxxxxxxx >Before posting, please take a moment to review the archives >at http://archive.midrange.com/midrange-l.
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.