Are you sure that it's returning such a short string? Perhaps your client is only displaying 53 characters?
Have you tried running it as:
select length (myudf (parameter)) from sysibm.dummy1;
Kent
>
>I have a simple function that takes a single parm and returns a
>varchar(1000).
>
>When I execute the function it only return about 53 characters -
>
>Any thoughts on that ??
>
>create function PMFSP.JGETTRANS(p_fund INTEGER )
>
>returns VARCHAR(15000)
>
>LANGUAGE SQL
>SPECIFIC "PMFSP"."JGETTRANS"
>
> NOT DETERMINISTIC
> READS SQL DATA
> STATIC DISPATCH
> CALLED ON NULL INPUT
> EXTERNAL ACTION
> INHERIT SPECIAL REGISTERS
>
>BEGIN ATOMIC
>
>
>DECLARE O_RETURN VARCHAR(15000) DEFAULT '';
>
>
>SET O_RETURN = '';
>
>SET O_RETURN =
>'sdkgjniosjfiosdjniJNIOSDNOISDHNOISDHNIOsnvoisdhnviasd09vuasdvj3klmnf3ujhv0asd9jwepijhfwe90ucvjwJFWEIOJHCVSD90UCV-0Wujfwejcvpjcpajhf-0weuf-0eujfwe90jh';
>
>RETURN O_RETURN;
>
>END;
>
>only returns:
>sdkgjniosjfiosdjniJNIOSDNOISDHNOISDHNIOsnvoisdhnvia
>
>
>
>
>-----------------------------------------
>This e-mail and any attachments are intended only for the
>individual or company to which it is addressed and may contain
>information which is privileged, confidential and prohibited from
>disclosure or unauthorized use under applicable law. If you are
>not the intended recipient of this e-mail, you are hereby notified
>that any use, dissemination, or copying of this e-mail or the
>information contained in this e-mail is strictly prohibited by the
>sender. If you have received this transmission in error, please
>return the material received to the sender and delete all copies
>from your system.
>
>
>---------------------------------------------------------------------
>TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
>To post a dba job: http://jobs.lazydba.com
>To Subscribe : http://www.LazyDBA.com
>To unsubscribe: http://www.lazydba.com/unsubscribe.html
>
>
DB2 & UDB email list listserv db2-l LazyDBA home page