|
I have a requirement where I need to supply multiple results sets
from an RPGLE Stored Proc. Normally I would utilize SQL Cursors for
this like the following code snippet:
// Define SQL statements...
...
// Create cursors and return...
EXEC SQL PREPARE STMT1 FROM :@Sqlstmt1 ;
EXEC SQL DECLARE cursor1 CURSOR WITH RETURN TO CLIENT FOR STMT1 ;
EXEC SQL PREPARE STMT2 FROM :@Sqlstmt2 ;
EXEC SQL DECLARE cursor2 CURSOR WITH RETURN TO CLIENT FOR STMT2 ;
EXEC SQL OPEN cursor1;
EXEC SQL OPEN cursor2;
But unfortunately, in my current case I am faced with a situation
where a SQL statement cannot be used and I have to gather data using
traditional approach. I can build all the data in multiple DS
Arrays, but is it possible to create cursors out of the arrays? If so
how?
If not, does anyone know of any other trick to return multiple DS
Arrays as result sets from a Stored Proc?
As an Amazon Associate we earn from qualifying purchases.
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.