This structure is used to pass information to sqleseti - Set Client Information and sqleqryi - Query Client Information.
This structure specifies:
Applications can specify the following types of information:
Note: | This user ID is for identification purposes only, and is not used for any authorization. |
Note: | The information can be set using sqlesact - Set Accounting String. 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. |
Table 30. Fields in the SQLE-CLIENT-INFO Structure
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 below:
Type | Data Type | Description | ||
---|---|---|---|---|
SQLE_CLIENT_INFO_USERID | CHAR(255) | The user ID for the client. Some servers may truncate the value. For example, DB2 for OS/390 servers support up to length 16. 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. For example, DB2 for OS/390 servers support up to length 18. | ||
SQLE_CLIENT_INFO_ APPLNAME | CHAR(255) | The application name for the client. Some servers may truncate the value. For example, DB2 for OS/390 servers support up to length 32. | ||
SQLE_CLIENT_INFO_ ACCTSTR | CHAR(200) | The accounting string for the client. Some servers may truncate the value. For example, DB2 for OS/390 servers support up to length 200. | ||
|
Language Syntax
C Structure
/* File: sqlenv.h */ /* Structure: SQLE-CLIENT-INFO */ /* ... */ 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. * |