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



Thanks Birgitta. Sigh... I guess I'll have to create an export procedure that does not return a value and create the stored procedure over it.

"Birgitta Hauser" <Hauser@xxxxxxxxxxxxxxx> wrote in message news:<mailman.10471.1221291181.2545.rpg400-l@xxxxxxxxxxxx>...
Hi,

an UDF can only have input parameters, all output values must be handled
over the return value.
If you need several return values, you need an UDTF, which is a little more
complicated to write.

Stored procedures on the other hand can have input and output parameter, but
never a return value.
If you need to call the RPG function with all output parameters from an SQL
interface, write an additional RPG procedure, only calls your RPG-function
and returns the return value and the output parameter as output parameter.
After register this new procedure as stored procedure an call it.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and loosing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Lim Hock-Chai
Gesendet: Friday, 12. September 2008 21:47
An: RPG programming on the AS400 / iSeries
Betreff: basic UDF and store procedure question

I've a RPG export procedure returns indicator to the caller upon
completion. This export procedure accepts 5 parameters (First 2 are
input only and last 3 are output only parameters).

Question:
1) UDF question: Is it possible to can UDF over this export procedure
and gets the updated value of last 3 parameters?

2) Store Procedure Question: How do I handle the return value if I
create a store procedure over this export procedure (Note: I'm receiving
a "Pointer not set for location referenced." error at the return
statement)?

thanks

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.