Teradata provides the FNC_GetAnyTypeParamInfo library function for accessing information about each TD_ANYTYPE input and output parameter declared in your routine. FNC_GetAnyTypeParamInfo returns the following information for the parameters:
- The parameter positional index
- The data type of the parameter
- Whether the parameter is an input, output, or an INOUT parameter
- The maximum length, in bytes, for the data type
- The value n in a DECIMAL(n,m) type or the precision in Interval data types. For example:
the value p in INTERVAL DAY(p) TO SECOND(n)
- The value m in a DECIMAL(n,m) type or the fractional seconds precision in TIME, TIMESTAMP, and Interval data types. For example:
the n value in TIME(n) or INTERVAL DAY(p) TO SECOND(n)
- The server character set associated with a character data type
- The name of the data type if the parameter is a UDT
- An indicator to show if the type is a UDT and if so, what kind of UDT
- The return type of a TD_ANYTYPE result parameter
- The number of TD_ANYTYPE parameters
For details about FNC_GetAnyTypeParamInfo, see FNC_GetAnyTypeParamInfo.