External String Literal Examples | CREATE PROCEDURE | Teradata Vantage - External String Literal Examples - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-12-13
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
jbg1472252759029
lifecycle
latest
Product Category
Teradata Vantage™

The following examples demonstrate various external procedure external string literals.

Example 1: External String Literal Examples

The following example indicates that the source is to be obtained from the client, from absolute directory procedure_source. The file name on the server and the source file name are both sales.c. The C procedure name is sales1.

'CS¡sales¡C:\procedure_source\sales.c¡F¡sales1'

Example 2: External String Literal Examples

In the following example, the object is to be obtained from the lowest node on the server in directory /home/james/spdev/imagef.o. The file name on the server is img.o. The name of the object it retrieves is imagef.o.

'SO¡img¡/home/james/spdev/imagef.o¡F¡img_match'

Example 3: External String Literal Examples

The following example indicates that the header file sp_types.h and the C source file stdxml.c to be used for the procedure are to be found on the server.

/home/jcx/headers/sp_types.h is the relative path from the home or current client directory for the logged on user to the header file and home/jcx/src/stdxml.c is the relative path to the C source file. The procedure name in the C source code is called stdxml. Both files have the same name on the server.

'SI¡sp_types¡/home/jcx/headers/sp_types.h¡SS:stdxml¡home/jcx/src/
          stdxml.c¡F¡stdxml'

The following table summarizes the naming issues for the EXTERNAL NAME clause and its various components.

Procedure Name Source File Name Procedure Name in DBC.TVM C/C++ Procedure Name Comments
procedure_name only procedure_name procedure_name procedure_name procedure_name must be unique within its database.
procedure_name and external_procedure_name but not as 'string' external_procedure_name procedure_name procedure_name if not in 'string'

or

external_procedure_name if in 'string'
procedure_name and external_procedure_name as 'string' source_name as specified in 'string' procedure_name procedure_name if not in 'string'

or

external_procedure_name if in 'string'