Anonyblksqlexec IBM data server driver configuration keyword
Changes the anonymous block execution flow from the CALL statement execution path to the SQL execution path, when used in embedded SQL applications.
Attention: This keyword is available in Db2 11.5.6 and later versions.
- Equivalent CLI keyword
- None
- Equivalent IBM® data server provider for .NET connection string keyword
- None
- IBM data server driver configuration file (db2dsdriver.cfg) syntax
<parameter name="Anonyblksqlexec" value="0 | 1"/>
- Default setting:
- 0 | FALSE
- Usage notes:
-
When set to 1 in an embedded SQL application, the Anonyblksqlexec keyword changes the anonymous block execution flow from the CALL statement execution path to the SQL execution path.
For example, when the keyword set to 1, you can specify INPUT and OUTPUT parameters in both the USING and INTO clauses:
If a value for the keyword is not set, or if it is set to 0 (the default value), you can specify only input parameters in the USING clause and output parameters in the INTO clause:EXEC SQL EXECUTE db2strm1 INTO :h_name_in INDICATOR :h_name_in_ind, :h_name_out INDICATOR :h_name_out_ind USING :h_name_in,:h_name_out;
EXEC SQL PREPARE db2strm1 from strm1; EXEC SQL EXECUTE db2strm1 INTO :h_name_out INDICATOR :h_name_out_ind USING :h_name_in;
Note: See
the description of the variable DB2_ANONYMOUS_ESQL_EXECUTION_BLOCK for an alternate way of changing the behavior
of anonymous block execution through registry and environment variable settings.