savepkg Stored Procedure - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

Use the savepkg stored procedure to back up a specific version of a package and the associated DDL statements that install the package, storing the information in the demddl and dempart system tables.

Syntax

REPLACE PROCEDURE savepkg
   (IN  U_Name      VARCHAR(30),
    IN  U_Version   VARCHAR(30),
    IN  U_Database  VARCHAR(30),
    IN  U_DemT      VARCHAR(30),
    IN  U_Create    CLOB,
    IN  U_DemFN     VARCHAR(30),
    IN  U_Content   BLOB,
    OUT out1        VARCHAR(30)
   )

Syntax Elements

U_Name
Name of the package.
Vantage stores the name of the package in the demddl and dempart system tables in the SYSLIB database.
U_Version
Version of the package.
Vantage stores the version number that you assign to the package in the demddl and dempart system tables in the SYSLIB database.
U_Database
Database in which the package is installed.
Vantage stores the name of the database in which you installed the package in the demddl and dempart system tables in the SYSLIB database.
U_DemT
Value that you assign to describe the type of package or package component.
Vantage stores the value that you provide in the demddl system table in the SYSLIB database.
For example, if you are using savepkg to back up a UDF package, you might want to use the value 'UP'. If you are using savepkg to back up UDF package components, you might want to use 'US' for UDF source, 'UI' for UDF include files, and 'UO' for UDF objects.
U_Create
DDL statement that installs the package on the server.
If the DDL statement is in a file, you can use a USING variable name preceded by a COLON character. During processing, savepkg replaces U_Create with the contents of the file.
If the DDL statement specifies an EXTERNAL NAME clause with multiple parts, for example a C language source file and a C language include file, you must call savepkg for each part, but you only need to pass the DDL statement in the first call. In each subsequent call, you can pass 'NULL' for the U_Create argument.
Vantage stores the statement in the demddl system table in the SYSLIB database.
U_DemFN
Filename of the package.
U_Content
USING variable name preceded by a COLON character.
When you call savepkg to back up a package, the CALL statement that you use must specify a USING row descriptor. During processing, savepkg replaces U_Content with the contents of the package.
out1
Return status.