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



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
Bertram Books UK               
For the latest on Bertram Books products and services and for up-to-the-minute 
book news visit www.bertrams.com


This e-mail and any attachments may contain information that is confidential 
and privileged and is solely for the use of the intended recipient. If you are 
not the intended recipient please notify the sender and delete this e-mail and 
any attachments immediately







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.