CURRENT CLIENT_CORR_TOKEN special register

CURRENT CLIENT_CORR_TOKEN contains the value of the client correlation token from the client information that is specified for the connection.

The data type is VARCHAR(255).

The value of the special register can be changed by using one of the following application programming interfaces (APIs):

  • SQLE_CLIENT_INFO_PROGRAMID (sqleseti)
  • java.sql.Connection.setClientInfo (JDBC)
  • The RRS DSNRLI SIGNON, AUTH SIGNON, CONTEXT SIGNON, or SET_CLIENT_ID function

If one of these APIs is not used to set the value of the special register, the value defaults to the correlation identifier from the client driver such as an application identifier. If a correlation identifier is not provided by the client system, an LUWID (Logical Unit of Work ID) is generated which becomes the correlation token.

Example: Select the departments that are allowed to use the correlation token that is being used in this connection.
  SELECT DEPT
    FROM DEPT_CORR_TOKEN_MAP
    WHERE CORR_TOKEN_NAME = CURRENT CLIENT_CORR_TOKEN