17.05 - Rules for Calling a Procedure With Dynamic Result Sets From Embedded SQL - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1146-175K
Language
English (United States)
To be able to access dynamic result sets returned by a procedure called from embedded SQL, you must ensure that two preprocessor options are set properly.
  • Set the SQLCHECK option to FULL so the precompiler can pass the variables that receive the procedure OUT or INOUT parameters to the runtime phase of the preprocessor.

    The following table indicates how to set this option for mainframe-attached and workstation-attached environments:

    Enable SQL Syntax, Object Reference, and Privilege Checking to FULL Option
    Mainframe-attached SQLCHECK(FULL)
    Workstation-attached -sc FULL
  • If you define an embedded SQL cursor for a called procedure, you must also set the preprocessor TRANSACT option to BTET because CALL statements cannot be executed as part of a multistatement request in ANSI session mode.

    The following table indicates how to set this option for mainframe-attached and workstation-attached environments:

    Set the Transaction Mode to BTET Option
    Mainframe-attached TRANSACT(BTET)
    Workstation-attached -tr BTET

See Example: Calling a Stored Procedure that Returns Dynamic Result Sets from Embedded SQL.