Usage Notes - 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ā„¢

To get information about the TD_ANYTYPE input and output arguments passed to an external routine:

  1. Declare an integer variable, such as numAnytypeParams.
  2. Allocate sufficient memory for the AnyTypeAttributeArray buffer to hold information for all of the TD_ANYTYPE input and result parameters declared in your routine. This should be an array of anytype_param_info_eon_t structures, where each element of the array will contain the information for a particular TD_ANYTYPE parameter.
  3. Call FNC_GetAnyTypeParamInfo_eon and pass in a pointer to the AnyTypeAttributeArray buffer along with the size of the buffer, and a pointer to numAnytypeParams.

The FNC_GetAnyTypeParamInfo_eon function fills the AnyTypeAttributeArray buffer with information about each TD_ANYTYPE parameter. The information for the return type of a TD_ANYTYPE result parameter is contained in the last element of the array. The number of TD_ANYTYPE parameters is returned in the numAnyTypeParams parameter.

Be sure to free the memory allocated to the AnyTypeAttributeArray buffer when you have completed processing the information.