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



DebbieKelemen wrote:
I hope this is the right group to ask maybe not. However, I will
start here. I want to create a Stored Procedure which will be used by
a windows form application. To present the data quicker I want to use
an RPG program underneath the covers. How can I return a result set
from an RPG program? I am used to sending all of my fields back as
individual parms. The programmer developing the windows form
application has asked for a single result set. We do this with SQL
all the time however the data we are going after is in multiple files
and it is single record time access which has better performance with
RPG.

Can someone point me in the right direction?

Make the program SQLRPG, but only to enable defining the RESULT SET. Use the SQL statement SET RESULT SETS; e.g.
SET RESULT SETS WITH RETURN TO CLIENT ARRAY MyArray FOR NbrOf ROWS
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/db2/rbafzmsthsetrs.htm

Issue the CREATE PROCEDURE to define DYNAMIC RESULT SETS 1 for that SQLRPG program.
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/db2/rbafzmstcrtpef.htm

Regards, Chuck

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.