× 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.



I'm having a problem with SQLRPGLE that I don't understand.  I'm trying
to do 
a very simple open of my main Order file to fill a subfile display.  I
prepare 
a dynamic selection field which can get complicated later in the
program, 
however, at the start it is very simple.  At the first pass DYN_SEL
equals:
  Select * from "ORDER" order by ORODR#
The name of the file is ORDER and the field name ORODR# is the Order
Number 
which is the only key field to the physical file. I've tried the select
with 
and without the quotation marks.
 
When I get to the OPEN C1 statement, the program takes forever to open
the 
file.  The fetches and re-preparations later in the program happen at 
lightning speed.  When I display the Job right after the OPEN C1 I see
the 
ORDER file has an I/O Count of 13,705.  I believe what it's doing is 
rebuilding the index for the file each time.  Why wouldn't it just use
the 
already existing index?
 
Here's a sample of the exec sql's:
 
C
c/exec sql
C+ PREPARE S1 FROM :DYN_SEL
c/end-exec
C
c/exec sql
C+ DECLARE C1 CURSOR FOR S1
c/end-exec
C
c/exec sql
C+ OPEN C1
c/end-exec

 

 

________________________________________________________________________
______________________
Randy Kesterson, Information Services

Market Transport Services  - a UTi Worldwide Company| 110 N Marine Drive
| Portland, OR 97217 | USA
rpkesterson@xxxxxxxxxxxxxxxxxxx <mailto:rpkesterson@xxxxxxxxxxxxxxxxxxx>
| D +1 503.978.4353 | O +1 503.283.2405 x353 | F +1 503.978.4392 

 

 

 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.