Here is an example of how to back up version 1.0 of a package called libcstd2.so and its associated CREATE statement that installs the package on the Teradata server.
lobteq << EOF .logon slugger/adm455,sn6Y24 .using 'cstdlib2_DDL.txt'xfile 'libcstd2.so'xfile USING (a CLOB AS DEFERRED, b CLOB AS DEFERRED) CALL SYSLIB.savepkg('cstdlib2','1.0','SYSLIB','UP', :a, 'libcstd2.so', :b, out1); EOF
The CREATE statement in the cstdlib2_DDL.txt file looks something like this:
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';