× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Matt,

Strange...I checked my logical file, here's what's in it:
A          R RSST37                    PFILE(SST37)   
A*                                                    
A          K IVPLCD                                   
A          K IVPTNO                                   
A          K IVPTCL                                   
A          S IVCHK                     VALUES('3' '5')

And in my program, I have this key set up:
     C     PARTKEY       KLIST
     C                   KFLD                    IVPLCD
     C                   KFLD                    IVPTNO
     C                   KFLD                    IVPTCL

So when I do my reads, I'm using:
           IVPLCD = plcd;
           IVPTNO = IHPTNO;
           IVPTCL = IHPTCL;
           setll partkey sst37t2;
           dow not %eof(sst37t2);
             reade partkey sst37t2;

So I'm not sure what the problem would be with regards to using a
logical file.  I am doing everything correctly, no?

Thanks!

Brian.

-----Original Message-----
From: Haas, Matt [mailto:Matt.Haas@xxxxxxxxxxx] 
Sent: Tuesday, July 19, 2005 11:00 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Program performance incease ideas

Brian,

Are part number and color the first two fields in the logical? If not,
that's likely why it's not using it. If they are, you may need to add
additional fields to the where clause to force it to use it. For
example, if you have a size field, you'd add size=size to your where
clause.

Check the second level text. It will tell you why it choose that access
path. I'd also suggest creating a logical file based on the access path
suggestion and see what happens. If the access patch suggestion matches
your existing logical, make sure there's no select/omit criteria and
that the SRTSEQ value matches your job.

Matt





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.