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



Hi Jay,

When you say "exportable procedure" it sounds like you're writing a service program.

Are you talking about a procedure in an SQLRPGLE program?  And in that same program, you want to consume the result set produced by that procedure?

Further, it sounds like the c1 cursor you mention is defined in the procedure. That would only be visible within the procedure.  Were you trying to define the cursor in a procedure and then use it somewhere else?  Do you want your procedure to return the entire result set?

So many questions.

If you want to write a procedure that does some SQL then returns one record at a time from the result set, that should be doable.

Or you could write the procedure to return a data structure array of records.

It's hard to tell from what you've said exactly what you're trying to do.

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx
pdow@xxxxxxxxxxxxxx /

On 6/21/2023 11:47 AM, Jay Vaughn wrote:
is it possible to declare an sql in an exportable procedure, and use that
cursor in the consuming executable?

tried it but my consuming RPG pgm will not compile, saying it cannot find
the c1 cursor...
What am I missing or is it just not possible?

tia

Jay

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.