Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 11 Nov 2011 @ 13:47:29 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


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'


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023