sqle_conn_setting data structure
This structure is used to specify connection setting types and values for the sqleqryc and sqlesetc APIs.
Field Name | Data Type | Description |
---|---|---|
TYPE VALUE | SMALLINT SMALLINT | Setting type. Setting value. |
Type | Value | Description |
---|---|---|
SQL_CONNECT_TYPE | SQL_CONNECT_1
SQL_CONNECT_2 |
Type 1 CONNECTs enforce the single database per unit of work semantics of older releases, also known as the rules for remote unit of work (RUOW). Type 2 CONNECTs support the multiple databases per unit of work semantics of DUOW. |
SQL_RULES | SQL_RULES_DB2
SQL_RULES_STD |
Enable the SQL CONNECT statement to switch the current connection to an established (dormant) connection. Permit only the establishment of a new connection through the SQL CONNECT statement. The SQL SET CONNECTION statement must be used to switch the current connection to a dormant connection. |
SQL_DISCONNECT | SQL_DISCONNECT_EXPL
SQL_DISCONNECT_COND SQL_DISCONNECT_AUTO |
Removes those connections that have been explicitly marked for release by the SQL RELEASE statement at commit. Breaks those connections that have no open WITH HOLD cursors at commit, and those that have been marked for release by the SQL RELEASE statement. Breaks all connections at commit. |
SQL_SYNCPOINT | SQL_SYNC_TWOPHASE
SQL_SYNC_ONEPHASE SQL_SYNC_NONE |
Requires a Transaction Manager (TM) to coordinate two-phase commits among databases that support this protocol. Uses one-phase commits to commit the work done by each database in multiple database transactions. Enforces single updater, multiple read behavior. Uses one-phase commits to commit work done, but does not enforce single updater, multiple read behavior. |
SQL_DEFERRED_PREPARE | SQL_DEFERRED_PREPARE_NO
SQL_DEFERRED_PREPARE_YES SQL_DEFERRED_PREPARE_ALL |
The PREPARE statement will be executed at the time it is issued. Execution of the PREPARE statement will be deferred until the corresponding OPEN, DESCRIBE, or EXECUTE statement is issued. The PREPARE statement will not be deferred if it uses the INTO clause, which requires an SQLDA to be returned immediately. However, if the PREPARE INTO statement is issued for a cursor that does not use any parameter markers, the processing will be optimized by pre-OPENing the cursor when the PREPARE is executed. Same as YES, except that a PREPARE INTO statement which contains parameter markers is deferred. If a PREPARE INTO statement does not contain parameter markers, pre-OPENing of the cursor will still be performed. If the PREPARE statement uses the INTO clause to return an SQLDA, the application must not reference the content of this SQLDA until the OPEN, DESCRIBE, or EXECUTE statement is issued and returned. |
SQL_CONNECT_NODE | Between 0 and 999, or the keyword SQL_CONN_CATALOG_NODE. | Specifies the node to which a connect is to be made. Overrides the value of the environment variable DB2NODE. For example, if nodes 1, 2, and 3 are defined, the client only needs to be able to access one of these nodes. If only node 1 containing databases has been cataloged, and this parameter is set to 3, the next connect attempt will result in a connection at node 3, after an initial connection at node 1. |
SQL_ATTACH_NODE | Between 0 and 999. | Specifies the node to which an attach is to be made. Overrides the value of the environment variable DB2NODE. For example, if nodes 1, 2, and 3 are defined, the client only needs to be able to access one of these nodes. If only node 1 containing databases has been cataloged, and this parameter is set to 3, then the next attach attempt will result in an attachment at node 3, after an initial attachment at node 1. |
Note: These field names are defined for the C programming
language. There are similar names for FORTRAN and COBOL, which have
the same semantics.
API and data structure syntax
SQL_STRUCTURE sqle_conn_setting
{
unsigned short type;
unsigned short value;
};
COBOL Structure
* File: sqlenv.cbl
01 SQLE-CONN-SETTING.
05 SQLE-CONN-SETTING-ITEM OCCURS 7 TIMES.
10 SQLE-CONN-TYPE PIC S9(4) COMP-5.
10 SQLE-CONN-VALUE PIC S9(4) COMP-5.
*