sqle_client_info data structure
This structure is used to pass information to the sqleseti and sqleqryi APIs.
This structure specifies:
- The type of information being set or queried
- The length of the data being set or queried
- A pointer to either:
- An area that will contain the data being set
- An area of sufficient length to contain the data being queried
Applications can specify the following types of information:
- Client user ID being set or queried. A maximum of 255 characters
can be set, although servers can truncate this to some platform-specific
value. Important: This user ID is for identification purposes only, and is not used for any authorization.
- Client workstation name being set or queried. A maximum of 255 characters can be set, although servers can truncate this to some platform-specific value.
- Client application name being set or queried. A maximum of 255 characters can be set, although servers can truncate this to some platform-specific value.
- Client current package path being set or queried. A maximum of 255 characters can be set, although servers can truncate this to some platform-specific value.
- Client program ID being set or queried. A maximum of 80 characters can be set, although servers can truncate this to some platform-specific value.
- Client accounting string being set or queried. A maximum of 255 characters
can be set, although servers can truncate this to some platform-specific
value. Attention: The information can be set using the sqlesact API. However, sqlesact does not permit the accounting string to be changed once a connection exists, whereas sqleseti allows the accounting information to be changed for future, as well as already established, connections.
Field Name | Data Type | Description |
---|---|---|
TYPE | sqlint32 | Setting type. |
LENGTH | sqlint32 | Length of the value. On sqleseti calls, the length can be between zero and the maximum length defined for the type. A length of zero indicates a null value. On sqleqryi calls, the length is returned, but the area pointed to by pValue must be large enough to contain the maximum length for the type. A length of zero indicates a null value. |
PVALUE | Pointer | Pointer to an application-allocated buffer that contains the specified value. The data type of this value is dependent on the type field. |
The valid entries for the SQLE-CLIENT-INFO TYPE element
and the associated descriptions for each entry are listed in the following
table:
Type | Data Type | Description |
---|---|---|
SQLE_CLIENT_INFO_ACCTSTR | CHAR(255) | The accounting string for the client. Some servers may truncate the value. |
SQLE_CLIENT_INFO_APPLNAME | CHAR(255) | The application name for the client. Some servers may truncate the value. |
SQLE_CLIENT_INFO_AUTOCOMMIT | CHAR(1) | The autocommit setting of the client. It can be set to SQLE_CLIENT_AUTOCOMMIT_ON or SQLE_CLIENT_AUTOCOMMIT_OFF. |
SQLE_CLIENT_INFO_CORR_TOKEN | CHAR(255) | The correlation token name that is used for correlating the process between the database server (also called application server) and the database client (also called application requester). The correlation token name can be sent to Db2® for z/OS® servers that support the CLIENT_CORR_TOKEN special register. |
SQLE_CLIENT_INFO_PROGRAMID | CHAR(80) | The program identifier for the client. Once this element is set, Db2 Universal Database for z/OS Version 8 associates this identifier with any statements inserted into the dynamic SQL statement cache. This element is only supported for applications accessing Db2 UDB for z/OS Version 8. |
SQLE_CLIENT_INFO_USERID | CHAR(255) | The user ID for the client. Some servers may truncate the value. This user ID is for identification purposes only, and is not used for any authorization. |
SQLE_CLIENT_INFO_WRKSTNNAME | CHAR(255) | The workstation name for the client. Some servers may truncate the value. |
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_client_info
{
unsigned short type;
unsigned short length;
char *pValue;
};
COBOL Structure
* File: sqlenv.cbl
01 SQLE-CLIENT-INFO.
05 SQLE-CLIENT-INFO-ITEM OCCURS 4 TIMES.
10 SQLE-CLIENT-INFO-TYPE PIC S9(4) COMP-5.
10 SQLE-CLIENT-INFO-LENGTH PIC S9(4) COMP-5.
10 SQLE-CLIENT-INFO-VALUE USAGE IS POINTER.
*