Request-pointer and the USING Row Descriptor - Call-Level Interface Version 2

Teradata Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

Product
Call-Level Interface Version 2
Release Number
16.10
Published
May 2017
Language
English (United States)
Last Update
2018-05-07
dita:mapPath
jen1488824663137.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2417
lifecycle
previous
Product Category
Teradata Tools and Utilities

If a USING row descriptor is included in the Teradata SQL request, the USING row descriptor must be the very first clause in the request.

The USING row descriptor names and describes each field of the data pointed to by USING-data-pointer, in positional sequence.

Each field name may be referred to any number of times in any number of statements in that request, including the case of no references to that name. The maximum number of fields may be obtained using the DBCHQE SQL-limits query.

An example of a valid request follows:

USING x1 (INTEGER), x2 (CHAR (2) )
      SELECT * FROM t1 WHERE c1 = :x2;
      SELECT * FROM t2 WHERE c2 = :x2;

The USING row descriptor is also used for macro arguments, as in the following example:

USING x1 (INTEGER) EXEC MACRO (:x1);

For more information about the nature of the USING row descriptor and where it is placed in relation to other information, see SQL Fundamentals (B035-1141).