Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

SHOW-TRANSACTIONS

This statement displays open transactions.

Scope of validity

DBH and SESDCN administration

Function

The SHOW-TRANSACTIONS administration statement displays a table of all open transactions. In SESDCN administration, you can use the statement to display the open transactions of selected users.

This statement is rejected if there are currently no open transactions active in the DBH or known to SESDCN. In this case you receive a message to this effect. The statement is also rejected if the DBH was loaded without transaction management.

What is displayed in DBH administration differs from what is displayed in SESDCN administration.

In DBH administration, the following information appears for each open transaction:

  • The user identification
    If the user is an asynchronous UTM application, the conversation number is also displayed.

  • The number of executed I/Os (NUMBER OF I/OS)

  • The runtime in seconds since the beginning of the transaction (DURATION TIME)

  • The status of the transaction (STATUS)
    The following transaction statuses are possible:

    • 'BLANK' (the request is being processed in a thread)

    • LOCK (the transaction is locked by another transaction)

    • FREE (the request is unlocked)

    • PTC (the transaction is at the prepare-to-commit stage)

    • ADM (the user is the system administrator)

    • RESET (the transaction is being rolled back)

    • CAN (the SQL data-manipulation statement is canceled).

    • UTI (utility statement)

    • INTERN (internal system transaction)

  • The request identification of the locking transaction if the status of the transaction is LOCK (user-identification BY LOCK).
    If the user is an asynchronous UTM application, the conversation number is also displayed.

  • In addition, the system-generated identifications of the internal administrator (see "Identification of system-internal users") are output if the internal administrator has locked transactions that are to be output.

  • Utility statements are output here, as well, although they do not represent transactions that are visible from the outside. The utility statements are displayed nevertheless because they can hold locks.

In SESDCN administration, the following information is displayed for each open transaction:

  • The user identification
    If the user is an asynchronous UTM application, the conversation number is also displayed.

  • the runtime (in seconds:minutes) since the beginning of the transaction (RUN-TIME).

  • the activity level of the transaction as a measure of the work completed by the transaction (ACTIVITY LEVEL). The activity level is the sum of all physical I/Os that a transaction has initiated. However, a correct value is only obtained when logging of request accounting is activated for all the DBHs involved by means of the DBH option ACCOUNTING (see "ACCOUNTING") or the administration statement SET-ACCOUNTING-PARAMETER (see "SET-ACCOUNTING-PARAMETER").

  • the name of the computer on which the transaction is or was active (LOCATION). If the transaction has not yet been active on any computer, “NO” appears here.

  • The status of the transaction (STATUS)
    The following transaction statuses are possible:

    • R (READ)

    • W (WRITE)

    • R/W (READ and WRITE)

    • BTA (beginning of the transaction)

    • PTC (the transaction is in the state “prepared to commit”)

    • LOCK (the transaction is locked by another transaction)

    • UNLC (the transaction is not locked).

  • the lock time (in hours:minutes) if the state of the transaction is LOCK (LOCK-TIME).

SHOW-TRANSACTIONS

USER = *ALL / <user-identification>

,STRUCTURE-OUTPUT = *NONE / *SYSINF / <structured-name 1..20>(...)


<structured-name 1..20>(...)



|

WRITE-MODE = *REPLACE / *EXTEND

Operands

USER =

Identifies the user or users whose transactions are to be displayed.

USER = *ALL
This is the default. All open transactions are displayed. In DBH administration, only the default is permitted.

USER = <user-identification>
Only the open transactions of the user with the specified identification are displayed. The syntax of the parameter is described in section “Syntax for the identification of users”.
This parameter is permitted only in SESDCN administration.

STRUCTURE-OUTPUT = *NONE / *SYSINF / <structured-name 1..20>

(WRITE-MODE = *REPLACE / *EXTEND)

In S procedures, specifies whether the information is to be output in S variables (see section “Syntax for output in S variables”).

Output in S variables (DBH administration)

Output information

Name of the S variable

T

Contents

Host name
(current user)

var(*LIST).HOST

S

<name 1..8>

Application
(current user)

var(*LIST).APPLICATION

S

<name 1..8>

User
(current user)

var(*LIST).CUSTOMER

S

<name 1..8>

Conversation number
(current user)

var(*LIST).CONVERSATION

S

<x-text 1..8> / '' (void)

Number of inputs/outputs

var(*LIST).IO

S

<integer>

Runtime (in seconds)

var(*LIST).DURATION-TIME

S

<integer>

User’s state

var(*LIST).STATE

S

ADM / LOCK / RESET /
INTERN / CAN / PTC /
FREE / UTI / '' (void)

Host name
(locking transaction)

var(*LIST).LOCK-HOST

S

<x-text 1..8> / '' (void)

Application
(locking transaction)

var(*LIST).
LOCK-APPLICATION

S

<x-text 1..8> / '' (void)

User
(locking transaction)

var(*LIST).LOCK-CUSTOMER

S

<x-text 1..8> / '' (void)

Conversation number
(locking transaction)

var(*LIST).
LOCK-CONVERSATION

S

<x-text 1..8> / '' (void)

Output in S variables (DBH administration)

Output information

Name of the S variable

T

Contents

Host name
(current user)

var(*LIST).HOST

S

<name 1..8>

Application
(current user)

var(*LIST).APPLICATION

S

<name 1..8>

User
(current user)

var(*LIST).CUSTOMER

S

<name 1..8>

Conversation number
(current user)

var(*LIST).CONVERSATION

S

<x-text 1..8> / 0

User ID (BS2000),
job name (DCAM),
program unit (UTM)

var(*LIST).USER-NAME

S

<name 1..8>

Runtime (hh:mm)

var(*LIST).RUN-TIME

S

<time 5 .. 5>

Activity level

var(*LIST).ACTIVITY-LEVEL

S

<integer>

Location

var(*LIST).LOCATION(*LIST).
HOST

S

NO / <name 1..8>

State of the transaction

var(*LIST).LOCATION(*LIST).
TA-STATE

S

BTA / PTC / R / W / R/W

Lock state

var(*LIST).LOCATION(*LIST).
LOCK-STATE

S

LOCK / UNLC

Lock time (hh:mm)

var(*LIST).LOCATION(*LIST).
LOCK-TIME

S

<time 5..5> / '' (void)


Example 1

Output to the screen after entering the SHOW-TRANSACTIONS administration statement in DBH administration:

%SHOW-TRANSACTIONS
 USER-IDENTIFICATION ! NUMBER  ! DURATION! STATUS ! USER-IDENTIFICATION 
 ACTIVE              ! OF I/OS ! TIME    !        ! BY LOCK 
------------------------------------------------------------------------
 D016ZE07TSN=8GPZ    !        0!        0! ADM    ! 
 ADMINIST            !         !         !        ! 
 D016ZE09TSN=2A2V    !        0!     2053!        ! 
 USER0005            !         !         !        ! 
 D016ZE09TSN=2A2V    !        0!     2035!        ! 
 USER0006            !         !         !        ! 
 D016ZE09TSN=2A2V    !       12!     2123!        ! 
 USER0001            !         !         !        ! 
 D016ZE09TSN=2A2V    !        0!     2106!        ! 
 USER0002            !         !         !        ! 
 D016ZE09TSN=2A2V    !        0!     2085!        ! 
 USER0003            !         !         !        ! 
 D016ZE09TSN=2A2V    !        0!     2070!        ! 
 USER0004            !         !         !        ! 
% <date> <time> SES7215 END OF OUTPUT 
%// 


Example 2

Output to the screen after entering the SHOW-TRANSACTIONS administration statement in SESDCN administration:

%SHOW-TRANSACTIONS
          USER                          ! RUN-!ACTIVITY!LOCATION!  STATE ! LOCK!
                                         TIME!  LEVEL !        !        ! TIME
--------------------------------------------------------------------------------
D016ZE09TSN=7QLXSEDI63  00000000SQLDB112!00:04!  00000 !D016ZE08!BTA UNLC!
                                              !        !D016ZE09!BTA UNLC!
D016ZE09TSN=7QLZDSQL    00000000SQLDB112!00:02!  00000 !D016ZE08! R  UNLC!
                                        !     !        !D016ZE09! R  UNLC!
D016ZE09TSN=7R12USER000100000000SQLDB112!00:38!  00000 !D016ZE08! R  UNLC!
                                        !     !        !D016ZE09!BTA UNLC!
D016ZE09TSN=7R12USER000200000000SQLDB112!00:36!  00000 !D016ZE08!BTA UNLC!
                                        !     !        !D016ZE09! R  UNLC!
%  <date> <time> SEN2014 END OF THE 'SESDCN' ADMINISTRATION STATEMENT
%// 
When a user is active at multiple locations, one output line is generated per location (Location). The first output line then contains all the information, and the following lines only the “Location”, “State” and “Lock Time” data.


Administration command in ISP format and at the CALL DML interface

The USER,TA administration command corresponds to the SHOW-TRANSACTIONS administration statement here.

USER,TA