James

As to your first test, I don't think you can just put a UDF on the STRSQL command line and have it work - it's not a valid SQL statement, rather, something you can use IN a statement.

I think!

You also need to be sure your RPG or whatever takes in a varying-length parameter - the '02' string will be cast to varying, not fixed, by SQL.

Vern

On 3/29/2011 1:50 PM, James Lampert wrote:
I'm trying to write a UDF to convert from a "code" to a "display value."

I think I managed it,
Function DISPLAYVAL was created in MERCURY.
but I'm having trouble testing it (probably from not knowing what I'm doing)

I try
displayval(1001, '02')
and I get
Token DISPLAYVAL was not valid. Valid tokens: ( CL END GET SET CALL
I try
create procedure myproc3
begin
signal SQLSTATE '70000' set message_text = displayval(1001, '02')
end
and I get
Variable DISPLAYVAL not defined or not usable.
I'm obviously doing *something* wrong, but I haven't a clue *what*.

--
JHHL

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.