Here is an example of how to distribute version 1.0 of a package called libcstd2.so to all nodes. In this example, the target server directory is /Teradata/dem/udfs and there is an .so file on the Windows client:
LobTeq -- Enter your DBC/SQL request or LobTeq command: .using 'libcstd2.so'xfile *** .using accepted LobTeq -- Enter your DBC/SQL request or LobTeq command: USING (a BLOB AS DEFERRED) CALL SYSLIB.installsp('cstdlib2', '1.0', 'libcstd2.so', 'udfs', :a, 'CREATE', pform, cfgpath); Sending LOB data, chunk 1 *** Procedure has been executed. LINUX64 /Teradata/dem/udfs/
Here is an example of a CREATE FUNCTION statement that creates the function from the installed package.
CREATE FUNCTION SYSLIB.cSTD_DEV(x FLOAT) RETURNS FLOAT CLASS AGGREGATE LANGUAGE C NO SQL PARAMETER STYLE SQL EXTERNAL NAME 'SP!/Teradata/dem/udfs/libcstd2.so';
Note that the filename and path specified in the EXTERNAL NAME clause are the same as the filename IN argument and cfgpath OUT argument in the call to installsp.