CURRENT CLIENT_WRKSTNNAME

CURRENT CLIENT_WRKSTNNAME contains the value of the workstation name from the client information that is specified for the connection.

The data type is VARCHAR(255).

Start of changeThe default workstation name varies, depending on the connection:End of change

  • If the connection originates from a DB2® 10 for z/OS® requester, it is the client host name.
  • If the connection is from a remote application client driver, it is the client host name where the request is submitted. Default values that are set by the IBM® Data Server Driver for JDBC and SQLJ can be obtained from the DatabaseMetaData.getClientInfoProperties method.
  • If the connection is from a remote DB2 10 for z/OS application, the default varies depending on which attachment facility is used:Start of change
    TSO attachment facility
    The default workstation name is one of the following cases:
    • The default workstation name is 'TSO' when the application runs in TSO foreground with TSO online applications like SPUFI.
    • The default workstation name is 'BATCH' when the application runs in TSO background with TSO batch applications like DSNTEP2.
    RRS attachment facility interface
    The default workstation name is 'RRSAF
    Call attachment facility
    The default workstation name is 'DB2CALL'.
    CICS® attachment facility
    The default workstation name is the CICS region name.
    IMS™ Attachment facility
    The default workstation name is IMS region ID.
    End of change

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

  • SQLE_CLIENT_INFO_WRKSTNNAME (sqleseti)
  • DB2Connection.setDB2ClientWorkstation(String info)
  • The RRS DSNRLI SIGNON, AUTH SIGNON, CONTEXT SIGNON, or SET_CLIENT_ID function
  • The WLM_SET_CLIENT_INFO stored procedure

Start of changeWhen the client workstation name is explicitly set, it overwrites the default workstation name described above and is used as the client workstation name.End of change

In a distributed environment, if the value set by the API exceeds 18 bytes, it is truncated to 18 bytes.

If one of these APIs is not used to set the value of the special register, an empty string is returned when the special register is referenced.

Example: Get the name of the workstation that is being used in this connection.
  SET :WS_NAME = CURRENT CLIENT_WRKSTNNAME