Administrative API Reference

sqlesact - Set Accounting String

Provides accounting information that will be sent to a DRDA server with the application's next connect request.

Authorization

None

Required Connection

None

Version

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

AccountingStringLen
Input. A 2-byte unsigned integer representing the length in bytes of the accounting string.

pAccountingString
Input. A string containing the accounting data.

pSqlca
Output. A pointer to the sqlca structure. For more information about this structure, see SQLCA.

Sample Programs

C
\sqllib\samples\c\setact.c

COBOL
\sqllib\samples\cobol\setact.cbl

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, which contains more information about the accounting string and the DRDA servers that support it.

sqleseti - Set Client Information.


[ Top of Page | Previous Page | Next Page ]