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



We're getting into using embedded SQL in RPG programs to return result 
sets to Net.Data macros.  It works great.  We've figured out how to return 
the entire result set, but how do we limit the result set to the first 'n' 
rows and then how do we get the result set to start at row 'n + 1' and 
return 'n' more rows? 

What we're looking to do is page through large result sets rather than 
display them all at once.  When using SQL in Net.Data, we used the 
START_ROW_NUM and RPT_MAX_ROWS variables to page through result sets.

Here's what we're doing to return a result set:

c/exec sql
c+ declare C1 cursor for
c+
c+ select *
c+ from filename
c+ where fieldname = :value
c+ order by fieldname
c+
c+ for fetch only
c/end-exec

c/exec sql
c+ open C1
c/end-exec

c/exec sql
c+ set result sets cursor C1
c/end-exec

Also, does anyone know if can we call an SQLRPGLE program that returns a 
result set from a Java servlet, so we can use JSP's to format and display 
the result set?

Thanks!

Mike E.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.