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



Charles,

Yes, I've tried the same format with the array result set and get syntax
and compile errors.  Using the arrays, it just doesn't seem to be able
to handle multiple result sets like it does with cursors?

Thanks for all your input.  I think we're almost there...anyone else
have any ideas?  Specifically about getting an array into a cursor in
RPG?

Dane

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of CWilt@xxxxxxxxxxxx
Sent: Wednesday, June 16, 2004 7:30 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: SQL Issues

Dane,

Ah, I understand what you are wanting.

Unfortunately, I've never done this myself.  Have you tried using the
same
format for the arrays as you do the cursors?

/exec SQL
set result sets array :rs for :rsrow rows, array :ms for :msrow rows
/end-exec


Other than that, I don't have a clue.  Perhaps someone else will.


Charles


> -----Original Message-----
> From: Dane Cox [mailto:DCox@xxxxxxxxxxxxx]
> Sent: Tuesday, June 15, 2004 6:51 PM
> To: RPG programming on the AS400 / iSeries
> Subject: RE: SQL Issues
> 
> 
> Charles,
> 
> That's not exactly what I mean.  He is using an 'array' result set in
> his first example.  The example he used later in his post is 
> the one I'm
> talking about.  Here are the two different statements...
> 
> Array:  set result sets array :rs for :rsrow rows
> Cursor:  set result sets cursor c1
> 
> For some reason, I am unable to see multiple 'array' result 
> sets coming
> back from a stored procedure.  In this case, I use two different
> statements to set the result sets.
> 
> /exec sql
> set result sets array :rs for :rsrow rows
> /end-exec
> 
> /exec sql
> set result sets array :ms for :msrow rows
> /end-exec
> 
> This doesn't work as expected and we only get one result set 
> back to the
> caller...the second one.
>  
> With your help, I am able to see multiple 'cursor' result sets coming
> back.
> 
> /exec sql
> set result sets cursor c1, cursor c2
> /end-exec
> 
> Now that we can get multiple result sets back using the 'cursor'
> technique, I am wondering how to get a simple array (or array ds) into
> an SQL cursor in an RPG program?  Specifically, I would like to put
> array 'rs' into cursor 'c1' and array 'ms' into cursor 'c2'.
> 
> Does that make sense?
> 
> Thanks,
> Dane
> 
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




NOTICE: This electronic mail message and any files transmitted with it are 
intended exclusively for the individual or entity to which it is addressed. The 
message, together with any attachment, may contain confidential and/or 
privileged information. Any unauthorized review, use, printing, saving, 
copying, disclosure or distribution is strictly prohibited. If you have 
received this message in error, please immediately advise the sender by reply 
email and delete all copies.





As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.