Another way to provide general global functions that UDFs can reference is to install a separate library of functions on the database on all nodes.
Here is an example that uses the package name clause of the CREATE FUNCTION statement to install a library of functions:
CREATE FUNCTION UDF1(A CHAR(30)) RETURNS INTEGER ... EXTERNAL NAME 'SP!/usr/local/lib/libGenUdfs.so!F!udf1'
where libGenUdfs.so is a shared object file containing the library of functions that UDF1 can call and udf1 is the function entry point name in the shared object file for UDF1.
The shared object file must already be installed on the system and distributed to all its nodes before you use the CREATE FUNCTION statement. If you migrate to another system, you must copy the shared object file to /usr/local/lib on the target system before starting the database migration.
For more information on installing libraries, see Administration.