The WLM_SET_CLIENT_INFO procedure sets client information associated with the current connection at the DB2 server.
By using this procedure, you can set the client's user ID, application name, workstation name, accounting information, or workload information at the DB2 server. Calling this procedure changes the stored values of the relevant transaction processor (TP) monitor client information fields and special register settings for this connection.
The client information fields are used at the DB2 server for determining the identity of the application or user currently using the connection. The client information fields for a connection are considered during DB2 workload evaluation and also displayed in any DB2 audit records or application snapshots generated for this connection.
Unlike the sqleseti API, this procedure does not set client information at the client but instead sets the corresponding client attributes on the DB2 server. Therefore, you cannot use the sqleqry API to query the client information that is set at the DB2 server using this procedure. If an application uses the sqleseti API to change the client information, the new values will change the setting at the DB2 server. If the sqleseti API is used to change either the user ID or the application name without changing the accounting information, the accounting information at the DB2 server will also be reset to the value of the accounting information at the client.
The data values provided with the procedure are converted to the appropriate database code page before being stored in the related TP monitor fields or special registers. Any data value which exceeds the maximum supported size after conversion to the database code page is truncated before being stored at the server. The truncated values are returned by both the TP monitor fields and the special registers when those stored values are queried.
The WLM_SET_CLIENT_INFO procedure is not under transaction control, and client information changes made by the procedure are independent of committing or rolling back units of work. However, because workload reevaluation occurs at the beginning of the next unit of work for each application, you must issue either a COMMIT or a ROLLBACK statement to make client information changes effective.
>>-WLM_SET_CLIENT_INFO--(--client_userid--,--client_wrkstnname--,--> >--client_applname--,--client_acctstr--,--client_workload--)---><
The schema is SYSPROC.
None
CALL SYSPROC.WLM_SET_CLIENT_INFO('db2user', 'machine.torolab.ibm.com',
'auditor', 'Accounting department', 'AUTOMATIC')
CALL SYSPROC.WLM_SET_CLIENT_INFO('db2user2', NULL, NULL, NULL, NULL)
CALL SYSPROC.WLM_SET_CLIENT_INFO('', NULL, NULL, NULL, NULL)
If the input that you specify for any procedure parameter exceeds its specified field length, the input field is truncated and the procedure runs using the truncated inputs.
Input fields containing single quotations are not supported and result in an error.