Debbie, 
This is what I learned from IBM tech support last month on my first
attempt to return a Result set from an RPG stored procedure. For
excellent examples on stored procedures, see the RedBook at:
http://www.redbooks.ibm.com/abstracts/sg246503.html?Open                
1.  IBM told me that a result set is NOT a parameter on the call.  That
was a new thought to me.
2.  Here is the code from the P55007A rpgle program I wrote:
Dproduct          DS                  occurs(18002) 
DITEM                     1     25                  
DPRICE                   26     35S 4 INZ(0)        
DCATALOG                 36     60                  
DDESCRIPT1               61     90                  
++++++++++++++++++++++++++++++
C                   eval      i$=i$+1   
C     i$            occur     product   
C                   movel     imlitm        ITEM  
C                   movel     imaitm        CATALOG  
C* At program end, fetch all the rows in the result set             
C* into var:array                                                     
C/exec sql                                                            
C+ set result sets array :product for :i$ rows                        
C/end-exec                                                            
C                   seton                                        LR   
C                   return                                            
Compile with SBMJOB CMD(CRTSQLRPGI OBJ(AMSOBJ/P55007A)
SRCFILE(AMSSRC/JDESRCILE))  
See also:   
http://www.i5php.net/index.php?name=Forums&file=viewtopic&p=1149#1149
As an Amazon Associate we earn from qualifying purchases.
	
 
This mailing list archive is Copyright 1997-2025 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.