× 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 have a stored procedure I am trying to test. I am using STRSQL.
I have done a few of these before but normally a SQL. No issues testing.
I issue this command.
call myLibrary.myStoredProc('AB', 123456, 1234)
I get this message.
1 result sets are available from procedure MYSTOREDPROC in MYLIBRARY.
How do I see the result set?

My create command is this:
CREATE OR REPLACE PROCEDURE myLibrary.myStoredProc (
IN Parm1 CHAR(2)
,IN Parm2 numeric(7,0)
,IN Parm3 numeric(4,0)
)
DYNAMIC RESULT SETS 1
LANGUAGE RPGLE
READS SQL DATA
EXTERNAL NAME myLibrary.mySQLRPGLE
PARAMETER STYLE GENERAL
;

In a nut shell this is my SQLRPGLE
// Results Datastructure to sent to Stored Procedure data set
dcl-ds ResultsDS dim(8) qualified;
RIn zoned(7: 2);
ROut zoned(7: 2);
REavl zoned(7: 2);
RYear1 zoned(4);
End-ds;

...Code here to do stuff...

// Populate the Results Datastructure
for Cntr = 1 to MaxRows;
ResultsDS(Cntr).RIn = Rollin(Cntr);
ResultsDS(Cntr).Rout = Rollou(Cntr);
ResultsDS(Cntr).REavl = eavl(Cntr);
ResultsDS(Cntr).RYear1 = year1;
EndFor;

Exec SQL SET RESULT SETS Array :ResultsDS FOR :MaxRows ROWS;

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.