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



Colin

Second level text says more - name has to be in a qualified form, even for *LIBL, so make it '*LIBL/SQL0020' and let us know what happens.

Regards

Vern

At 12:25 PM 4/11/2003 +0100, you wrote:
Guys,

Im trying to define a user defined function, but I don't want to specify the
library that the external program lives in. According to the SQL reference
this should be possible, by not qualifying the name of the external program
with the library

Eg

CREATE FUNCTION COLINDEV/CVTDAT (DEC (8,0)) RETURNS DEC(8,0)
LANGUAGE RPGLE NO SQL PARAMETER STYLE DB2SQL
RETURNS NULL ON NULL INPUT NO EXTERNAL ACTION
EXTERNAL NAME 'SQL0020' DETERMINISTIC FINAL CALL

In theory, this should create the function CVTDAT in my dev library, and
should pick up the external program from the library list in effect at the
time an SQL statement is run using this function, rather than having to
hardcode the library name into the function!

But it does not work, I get this error message:
SQL0449 - External program name for routine SQL0020 in BERUSRPGM not valid

Don't know why, the manual says this should be ok!

Cheers
Colin.W



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.