Thread SQL Text Attributes

Use these attributes to view thread SQL text.

ACE Address The agent control element (ACE) (see QWHSACE) of the thread that is reported. The value in QWHSACE is the ACE of the IFI application that requested this trace record (Field name: QW0148AC).

Authorization ID The primary authorization ID from connection or signon (Field name: UWHCAID). For z/OS operator commands and DB2 system internal agents, the value is SYSOPR. Secondary authorization IDs might be the RACF groups associated with this primary authorization ID. The SQL ID is initially set to this primary authorization ID. The connection authorization exit and the signon authorization exit can change the primary authorization ID so that it is not the same as the original primary authorization ID (QWHCOPID). Distributed authorization ID translation can also change the primary authorization ID.

Collection Name The collection name (Field name: UW0148CI).

Connection ID The connection name (Field name: QWHCCN). It is not valid on end of memory and reflects the z/OS home address space (ASID) connection name for:
Batch:
'BATCH'
TSO:
'TSO'
QMF
'DB2CALL'
Utility
'UTILITY'
DB2 internal
DB2 subsystem ID
IMS
IMS-ID
CICS
CICS-ID
RRSAF
'RRSAF'
Distributed database access threads:
  • For threads from a DB2 requester, this field contains the connection name of the thread at the requesting location.
  • For threads using the DRDA protocol from a non-DB2 requester, this field contains the constant 'SERVER'.
Correlation ID The correlation ID value (Field name: QWHCCV).
  • For batch: JOBNAME
  • For TSO: LOGON-ID
  • For IMS/VS: PST#.PSBNAME
  • For CICS: CONNECTION_TYPE.THREAD_TYPE.THREAD_#.TRAN-ID
  • For RRSAF: CORRELATION-ID value from signon function
  • For threads from a DB2 requester: this field contains the correlation-ID name of the thread at the requesting location.
  • For threads using the DRDA protocol from a non-DB2 requester, this field contains the first 12 characters in the DDM external name (EXTNAM) parameter of the DDM EXCSAT command received as part of the SQL connect.

DB2 Subsystem The DB2 subsystem ID.

DB2 Version The DB2 version.

DSG Member Name The Data Sharing Group (DSG) member name.

Data Sharing Group The Data Sharing Group name.

End User ID The user ID of the end user's workstation (Field name: QWHCEUID). This can be different from the authorization ID used to connect to DB2. This field contains blanks if the client did not supply this information. If QWHCEUID OFF is not 0, this value is truncated.

Interval Start The start time of this interval.

Location Name The location name (Field name: UW0148LN). The location name contains the name of the local location or remote location, depending on where the thread executes a package. The following statements execute locally, regardless of the current package name:
  • COMMIT
  • ROLLBACK
  • SET <HOST VARIABLE> = CURRENT PACKAGE SET
  • SET <HOST VARIABLE> = CURRENT SERVER
For these statements, this field contains the location where the package executes, not the location where the statement executes.
Logical Unit of work ID The logical unit of the work ID (LUWID) as defined for the LU 6.2 interface (Field name: QW0148LU). The LUWID uniquely identifies the thread within the network, and consists of the following:
  • A fully qualified network name (QW0148LM)
  • An LUW instance number (QW0148UV) and an LUW sequence number (see fields below).
It consists of two 8-character fields: QW0148NI and QW0148LM, which together uniquely identify a client system.

MVS System ID The MVS identifier.

Originating System The managed system name of the agent. It is an alphanumeric text string, with a maximum of 32 characters; for example, DB91:SYS1:DB2.

Package ID The package ID (Field name: UW0148PN).

Plan Name The plan name (Field name: QWHCPLAN). It shows a blank for a DB2 command thread; otherwise:
  • For SPUFI with cursor stability: 'DSNESPCS'
  • For SPUFI with repeatable read: 'DSNESPRR'
  • For TSO: the application plan name
  • For IMS: the application plan name
  • For CICS: application plan name, IMS and CICS commands have a blank plan name.
  • For RRSAF create thread with the collection parameter: '?RRSAF '
  • For QMF: 'DSQPLAN'
  • For Distributed Database Access threads:
    • For threads using the DRDA protocol from a requester, this field contains the plan name that is executed at the requesting location.
    • For threads using the DRDA protocol from a non-DB2 requester or from a DB2 2.3 requester, this field contains the constant 'DISTSERV'.
  • For binding: 'DSNBIND' (system plan)
  • For utility: 'DSNUTIL ' (system plan)
  • For authorization: 'ACT' + X'0000000000' (system plan)
  • For unallocated threads and miscellaneous DB2 system service tasks: 'BCT' + X'0000000000' (system plan)
  • For startup: 'STARTCT' + X'00' (system plan)

Statement Text The SQL statement text. This section is shown if the agent is at thread level and an SQL statement is present. For dynamic SQL, the reported statement might be a SELECT statement, even though the statement that is processed by the application is a PREPARE, OPEN, or FETCH statement. For static SQL, the reported statement might be a SELECT statement, even though the actual statement is DECLARE CURSOR. Check the RDISTYPE field to determine the actual SQL statement type. Host variables are displayed as ' :H ' in this field.

Thread Type The connecting system type code (in hexadecimal). This field can have a null value. For example, this field contains a null value for some utilities (Field name: QWHCATYP).

Transaction Name The transaction or application name that the end user is running (Field name: QWHCEUTX). This identifies the application that is currently running, not the product that is used to run the application. This field contains blanks if the client did not supply this information.

Workstation Name The end user's workstation name. This field contains blanks if the client did not supply this information (Field name: QWHCEUWN).