One or more variable parameter names. A value is substituted for each parameter name when the request is processed. Also see “USING Request Modifier” in SQL Data Manipulation Language, B035-1146. This is an optional phrase.
USING does not work in a macro when the macro is accessed using BTEQ. When running BTEQ, specify USING in the EXECUTE request.
Including USING in a macro might require special programming. See your Teradata Field support engineer or the Teradata Support Center for help.
Example: Macro Support for UDT Parameters using the NEW Constructor Invocation Before Macro Invocation
The following example demonstrates macro support for UDT parameters.
The p2 parameter of the macro is a structured UDT.
The conversion from VARCHAR to the structured UDT is done using the NEW constructor invocation expression, which is performed before the macro is actually invoked.
CREATE MACRO m1 (p1 INTEGER, p2 structured_type) AS (INSERT t1(:p1, :p2);); USING (a INTEGER, b VARCHAR(100)) EXEC m1(:a, NEW structured_type(:b));