SET CURRENT FEDERATED ASYNCHRONY statement
The SET CURRENT FEDERATED ASYNCHRONY statement assigns a value to the CURRENT FEDERATED ASYNCHRONY special register.
This statement is not under transaction control.
Invocation
The statement can be embedded in an application program or issued through the use of dynamic SQL statements. It is an executable statement that can be dynamically prepared.
Authorization
None required.
Syntax
Description
- ANY
- Specifies a CURRENT FEDERATED ASYNCHRONY value of -1, which means that the execution of statements can involve asynchrony using a degree that is determined by the database manager. integer-constant
- Specifies an integer value between 0 and 32 767, inclusive. The execution of statements can involve asynchrony using the specified degree. If the value is 0 when an SQL statement is dynamically prepared, the execution of that statement will not use asynchrony. host-variable
- A variable of type INTEGER. The value must be between 0 and 32 767, inclusive, or -1 (representing ANY). If host-variable has an associated indicator variable, the value of that indicator variable must not indicate a null value (SQLSTATE 42815).
Notes
- The degree of asynchrony for static SQL statements can be controlled using the FEDERATED_ASYNCHRONY option of the PREP or BIND command.
- The initial value of the CURRENT FEDERATED ASYNCHRONY special register is determined by the federated_async database manager configuration parameter if the dynamic statement is issued through the command line processor (CLP). The initial value is determined by the FEDERATED_ASYNCHRONY bind option if the dynamic statement is part of an application that is being bound.
Examples
- Example 1: The following statement disables asynchrony
by setting the value of the CURRENT FEDERATED ASYNCHRONY special register
to 0.
SET CURRENT FEDERATED ASYNCHRONY = 0
- Example 2: The following statement sets the degree of asynchrony
to 5.
SET CURRENT FEDERATED ASYNCHRONY 5
- Example 3: The following statement sets the value of the
CURRENT FEDERATED ASYNCHRONY special register to -1, which specifies
that the database manager is to determine the degree of asynchrony.
SET CURRENT FEDERATED ASYNCHRONY ANY