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

You can pass parameters by defining them on the CREATE FUNCTION.

For example;

create function MyUDF(varchar(255), varchar(255))
returns varchar(255)
external name 'JavaUDF.TestUDF' language java
parameter style java fenced no sql
disallow parallel scratchpad

.. with...

public class JavaUDF {

public static String TestUDF(String s1, String s2) {

return s1.concat(s2);
}

}

... works fine as select MyUDF('abc', 'def') from pn/onerow

If a combination with returning a table works is something I haven't tried.

Kind regards,
Paul

----- Oorspronkelijk bericht -----
Van: Sultan yılmaz [mailto:yilmazsultan@xxxxxxxxx]
Verzonden: dinsdag, juli 10, 2007 10:48 AM
Aan: 'Java Programming on and around the iSeries / AS400'
Onderwerp: Re: trigger call java class

Hi again,

http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/rzaha/udftable.htm

There is a sample function and java class in this link.
And public void dump (String property, String value) methods have two
parameters.
And i call function like this :SELECT * FROM TABLE(PROPERTIES())

Why i don't call function like PROPERTIES('sample','test') with parameters?

is it possible?I want to send parameter to my java method.But how?


Sultan






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.