Provides accounting information that will be sent to a DRDA server with the application's next connect request.
Authorization
None
Required Connection
None
API Include File
sqlenv.h
C API Syntax
/* File: sqlenv.h */
/* API: Set Accounting String */
/* ... */
SQL_API_RC SQL_API_FN
sqlesact (
char * pAccountingString,
struct sqlca * pSqlca);
/* ... */
|
Generic API Syntax
/* File: sqlenv.h */
/* API: Set Accounting String */
/* ... */
SQL_API_RC SQL_API_FN
sqlgsact (
unsigned short AccountingStringLen,
char * pAccountingString,
struct sqlca * pSqlca);
/* ... */
|
API Parameters
Sample Programs
Usage Notes
To send accounting data with a connect request, an application should call this API before connecting to a database. The accounting string can be changed before connecting to another database by calling the API again; otherwise, the value remains in effect until the end of the application. The accounting string can be at most SQL_ACCOUNT_STR_SZ (defined in sqlenv) bytes long; longer strings will be truncated. To ensure that the accounting string is converted correctly when transmitted to the DRDA server, use only the characters A to Z, 0 to 9, and the underscore (_).
See Also
The DB2 Connect User's Guide contains more information about the accounting string and the DRDA servers that support it.