Archives of the TeradataForum
Message Posted: Fri, 11 Nov 2011 @ 13:47:29 GMT
Subj: | | Re: 5603: Errors encountered in compiling UDF |
|
From: | | Geoffrey Rommel |
There are two problems here. First, the parameters for UDF's must use the correct internal types and protocol. See the manual on UDF
programming. Specifically, this:
void plusudf(int *a, int *b, int *result)
must read thus:
void plusudf( INTEGER *a,
INTEGER *b,
INTEGER *result,
char? sqlstate[6] )
By the way, you may find that style SQL works better than TD_GENERAL.
Second, the Create Function statement is incorrect. The name of the C function (plusudf) must appear in the "external name" clause. See the
manual for details;?I believe this:
EXTERNAL NAME 'SS!plus!C:\LCD\UDF\plus.c'
should be this:
EXTERNAL NAME 'SS!plusudf!C:\LCD\UDF\plus.c'
|