Administrative API Reference
Specifies connection settings for the application. For information
about the applicable connection settings and their values, see SQLE-CONN-SETTING.
Authorization
None
Required Connection
None
Version
sqlenv.h
C API Syntax
/* File: sqlenv.h */
/* API: Set Client */
/* ... */
SQL_API_RC SQL_API_FN
sqlesetc (
struct sqle_conn_setting * pConnectionSettings,
unsigned short NumSettings,
struct sqlca * pSqlca);
/* ... */
|
Generic API Syntax
/* File: sqlenv.h */
/* API: Set Client */
/* ... */
SQL_API_RC SQL_API_FN
sqlgsetc (
struct sqle_conn_setting * pConnectionSettings,
unsigned short NumSettings,
struct sqlca * pSqlca);
/* ... */
|
API Parameters
- pConnectionSettings
- Input. A pointer to the sqle_conn_setting
structure, which specifies connection setting types and values.
Allocate an array of NumSettings sqle_conn_setting
structures. Set the type field of each element in this array
to indicate the connection option to set. Set the value
field to the desired value for the option. For more information about
this structure, see SQLE-CONN-SETTING.
- NumSettings
- Input. Any integer (from 0 to 7) representing the number of
connection option values to set.
- pSqlca
- Output. A pointer to the sqlca structure. For
more information about this structure, see SQLCA.
REXX API Syntax
REXX API Parameters
- values
- A compound REXX host variable containing the connection settings for the
application process. In the following, XXX represents the host variable
name.
- XXX.0
- Number of connection settings to be established
- XXX.1
- Specifies how to set up the CONNECTION type. The valid values
are:
- 1
- Type 1 CONNECT
- 2
- Type 2 CONNECT
- XXX.2
- Specifies how to set up the SQLRULES. The valid values are:
- DB2
- Process type 2 CONNECT according to the DB2 rules
- STD
- Process type 2 CONNECT according to the Standard rules
- XXX.3
- Specifies how to set up the scope of disconnection to databases at
commit. The valid values are:
- EXPLICIT
- Disconnect only those marked by the SQL RELEASE statement
- CONDITIONAL
- Disconnect only those that have no open WITH HOLD cursors
- AUTOMATIC
- Disconnect all connections
- XXX.4
- Specifies how to set up the coordination among multiple database
connections during commits or rollbacks. The valid values are:
- TWOPHASE
- Use Transaction Manager (TM) to coordinate two-phase commits
- ONEPHASE
- Use one-phase commit
- NONE
- Do not enforce single updater and multiple reader
- XXX.5
- Specifies the maximum number of concurrent connections for a NETBIOS
adapter.
- XXX.6
- Specifies when to execute the PREPARE statement. The valid values
are:
- NO
- The PREPARE statement will be executed at the time it is issued
- YES
- The PREPARE statement will not be executed until the corresponding OPEN,
DESCRIBE, or EXECUTE statement is issued. However, the PREPARE INTO
statement is not deferred
- ALL
- Same as YES, except that the PREPARE INTO statement is also deferred
Sample Programs
- C
- \sqllib\samples\c\client.c
- COBOL
- \sqllib\samples\cobol\client.cbl
- REXX
- \sqllib\samples\rexx\client.cmd
Usage Notes
If this API is successful, the connections in the subsequent units of work
will use the connection settings specified. If this API is
unsuccessful, the connection settings are unchanged.
The connection settings for the application can only be changed when there
are no existing connections (for example, before any connection is
established, or after RELEASE ALL and COMMIT).
Once the SET CLIENT API has executed successfully, the connection settings
are fixed and can only be changed by again executing the SET CLIENT
API. All corresponding precompiled options of the application modules
will be overridden.
For information about distributed unit of work (DUOW), see the Administration Guide.
See Also
sqleqryc - Query Client
sqleseti - Set Client Information.
[ Top of Page | Previous Page | Next Page ]