The Using Clause
The USING clause is an optional clause that provides certain OpenSQL statements with dynamic capabilities. The USING clause directs OpenSQL to use the variables pointed to by the sqlvar elements of the SQLDA (or other host variables) when executing the statement.
The USING clause has the following syntax:
USING DESCRIPTOR descriptor_name
Note: The keyword DESCRIPTOR is optional in some statements that accept the USING clause.
The following statements accept the USING clause:
• DESCRIBE
• EXECUTE
• EXECUTE IMMEDIATE
• FETCH
• OPEN
• PREPARE
For details about the EXECUTE statement, see
How to Execute a Dynamic Nonselect Statement. For details about the EXECUTE IMMEDIATE statement, see
How to Execute a Dynamic Select Statement.
Last modified date: 08/14/2024