× 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've found that passing the Where and Order By clause to my External I/O
>> module and passing back a
>> multi-occurring D/S with (say)  50 records just as fast and maybe faster
>> than a do loop Reading each individually.
>>
>>John,

>When you get your 50 records, what do you do if there are 60?  After you
>process the 50, do you go back and get back the remaining 10?  Do you
leave
>the cursor open, and do a FETCH NEXT?
>
>Phil

I have standardized routines for different files.   It passes back the
Multi-DS and leaves the cursor open.  The next time it is called it does a
FETCH NEXT.   I made my own copy of the SQLCA area D/S and pass that as
well that way the Caller can look at the return codes and see how many
actual records were fetched (SQLWRN5 ?).

I pass a control D/S with a Y,N flag(among other things like the Where and
Order by Clause) to tell the utility if it should do a new Prepare (Close,
Prepare, Open, etc)

Works great.  RPGIV Inquiries,  RPGIV Reports,  we even use the exact same
utility from VA/RPG instead of having the Files in the F-SPec of the VA/RPG
program.

I been doing this as a session at COMMON.

John



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.