How to implement UDFs on the DB2 server?
• UDF class files must be defined as a package in the format below: package cse532.cse532XX; where XX is the individual DB2 account number, i.e. cse532-1 or cse53240 for example. • The CREATE FUNCTION declaration in the program that registers the UDF must use the following format for the EXTERNAL NAME clause: EXTERNAL NAME ‘cse532.cse532XX.UDFclassfile!UDFfunction’ where UDFclassfile is your UDF class file and UDF function is the name of the method that implements the function (and again XX is the individual course account number). • To compile and run on the NT machines in 1239 you should first run C:\Program Files\SQLLIB\bin\SETPATH.BAT. If ever there is a problem compiling they should run “which javac” and make certain they are using the version installed under the SQLLIB tree. On the Solaris machines you must run ~db2inst1\db2cshrc. • To upload your UDF class files onto the DB2 server, do the following: • ftp to sbgraddb2.cs.sunysb.edu • login with username cse532 password it08nc1q