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



Then the logic might be exec sql values MyStoredProcedure(:var2) into
:Var1;

Exec SQL Set :MyHostVar = MyUDF(:Var1, :Var2, ... VarN);

Will also work

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 losing them? Not training them
and keeping them!"


-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von rob@xxxxxxxxx
Gesendet: Wednesday, 14.11 2012 17:13
An: Midrange Systems Technical Discussion
Betreff: Re: Call RPG UDF from ADO

I'm confused.

You are trying to call a RPG UDF from RPG? That's no problem; call your
subprocedure that has a return value. Bypass SQL.

Are you trying to call a SQL UDF from RPG with something like "Eval Var1 =
MyFunc(Var2)"? I think that would be more of a stored procedure than a UDF.
Then the logic might be exec sql values MyStoredProcedure(:var2) into :Var1;




Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail
to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: "Michael Naughton" <michael_naughton@xxxxxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>,

Date: 11/14/2012 10:10 AM
Subject: Call RPG UDF from ADO
Sent by: midrange-l-bounces@xxxxxxxxxxxx



Has anyone had any success calling an RPGLE UDF from a non-iSeries app
using ADO? I know I can write a stored procedure that will pass back a
parameter, and I can use the UDF in an SQL statement (as in 'SELECT
field1, field2, MyFunc(field3) FROM
MyTable"), but I'm curious if I can duplicate the functionality in RPGLE,
where I can just say "Eval Var1 = MyFunc(Var2)".

It looks like ADO has a parameter type of ReturnValue, but I'm having no
luck trying to code a command that uses it. I'm trying to do this out of a
Lotus Domino agent, using LotusScript (very similar to Visual Basic).

Thanks very much for any help you can give me,

Mike Naughton
Senior Programmer/Analyst
Judd Wire, Inc.
124 Turnpike Road
Turners Falls, MA 01376
413-676-3144
Internal: x 444
mnaughton@xxxxxxxxxxxx
****************************************
NOTICE: This e-mail and any files transmitted with it are confidential and
solely for the use of the intended recipient. If you are not the intended
recipient or the person responsible for delivering to the intended
recipient, be advised that any use is
strictly prohibited. If you have received this e-mail in error, please
notify us immediately by replying to it and then delete it from your
computer.


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.