DB2 Server for VSE & VM: Operation


Forcing Users to End Their Work

To force users to end their work, you can use either the SHOW ACTIVE, SHOW SYSTEM or SHOW CONNECT ACTIVE command followed by the FORCE operator command. The SHOW CONNECT command can be used with its other parameters, except for the INACTIVE, and in VM only, the WAITING parameters, which do not enable the FORCE command. You must enter the SHOW ACTIVE, SHOW CONNECT and FORCE commands from either the DB2 Server for VM operator console or the VSE system operator console for the force to succeed.
Note:For one example of why you may be required to force users, see Resolving CICS In-Doubt Logical Units of Work.

The operator of an unlike application server can sever the telecommunication link at the application server site, causing a rollback. The operator of an application server can also force unlike application requesters, thus severing the communication link and causing a rollback.

Suppose you want to force user JESSICA to end her DB2 Server for VSE & VM work. First, you must determine JESSICA's agent number. An agent is the application server's internal representation for a user. The application server numbers each agent.

To determine JESSICA's agent number, enter a SHOW ACTIVE command as illustrated in Figure 24 and Figure 25.

Figure 24. A Typical Example of the SHOW ACTIVE Command for Determining an Agent Number in VSE

+--------------------------------------------------------------------------------+
|AR                                                                              |
|MSG F4                                                                          |
|AR 015 1I40I READY                                                              |
|F4 004 ARI0062A SQLDS :                                                         |
|F4-004          Enter a DB2 Server for VSE operator command.                    |
|4 show active                                                                   |
|F4 004 Status of agents:                                                        |
|F4 004    Checkpoint agent is not active.                                       |
|F4 004    User Agent:   1 User ID:  JONES    is R/O APPL   7BA                  |
|F4 004       Agent is     processing and is in I/O           WAIT.              |
|F4 004    User Agent:   3 User ID:  JESSICA  is R/W APPL   5A4                  |
|F4 004       Agent is not processing and is in communication WAIT.              |
|F4 004    User Agent:   4 User ID:  TESTUSER is NIW SUBS                        |
|F4 004       Agent is not processing and is in communication WAIT.              |
|F4 004    1    agent(s) not connected to an APPL or SUBSYS.                     |
+--------------------------------------------------------------------------------+

Figure 25. A Typical SHOW ACTIVE Display on a VM Operator Console or ISQL Terminal

+--------------------------------------------------------------------------------+
|show active                                                                     |
|Status of agents:                                                               |
|   Checkpoint agent is not active.                                              |
|   User Agent:   1 User ID:  SMITH    is R/W APPL   7B4                         |
|      Agent is     processing and is in I/O           Wait.                     |
|   User Agent:   2 User ID:  MICHAEL  is R/O SUBS   7B9                         |
|      Agent is not processing and is in communication Wait.                     |
|   User Agent:   3 User ID:  JESSICA  IS R/O APPL   5A4                         |
|      Agent is processing an SQL/DS operator command.                           |
|   User Agent:   4 User ID:  TESTUSER IS R/W APPL   7BB                         |
|      Agent is     processing and is in I/O           Wait.                     |
|   User Agent:   5 User ID:  MACNEILL IS R/O APPL   7B9                         |
|      Agent is not processing and is in communication Wait.                     |
|   5    agent(s) not connected to an APPL or SUBSYS.                            |
|ARI0065I Operator command processing is complete.                               |
+--------------------------------------------------------------------------------+

JESSICA is agent 3. At this time, you might want to note JESSICA's logical unit of work identifier.

The logical unit of work identifier is the rightmost number on the line. JESSICA's is 5A4. You can use the number later to verify that the application server forced JESSICA's work.

To force JESSICA to end her work, you enter:



FORCE 3

or



FORCE 3 ROLLBACK

To verify that the application server has forced JESSICA's work, reenter the SHOW ACTIVE command. The display either shows that JESSICA is no longer assigned to the agent or that the agent is not active. It could also show that JESSICA is still assigned to the agent, but not in work (NIW). If JESSICA started another logical unit of work, the display shows a new logical unit of work identifier.

If the system rejects the FORCE command, a SHOW ACTIVE displays results similar to those described above. JESSICA may have disconnected before the application server processed the FORCE command, or may have ended her logical unit of work.

The FORCE command does not end the application. For this purpose, use other system facilities. For example, you can use the CP FORCE command from the VM system console. If the application is from a VSE guest, you can use the VSE system operator CANCEL command. For a CICS transaction, you can use CEMT TRMNAT.

The FORCE operator command has the following syntax:



               .-ROLLBACK---------------.
>>-FORCE--n----+------------------------+----------------------><
               |        .-DISABLE-.     |
               +-COMMIT-+---------+-----+
               '-ROLLBACK--+---------+--'
                           '-DISABLE-'
 

The FORCE command causes the logical unit of work identified by agent number n to be backed out (when you specify ROLLBACK) or committed (when you specify COMMIT). The COMMIT option is valid only for an in-doubt logical unit of work. An in-doubt logical unit of work can only come from VSE guests. (An in-doubt logical unit of work is identified by PREPARED FOR COMMIT OR ROLLBACK in the SHOW ACTIVE display.) Always specify COMMIT for ISQL in-doubt logical units of work.

If you specify the DISABLE option, the connection to the application requester is disabled, the logical unit of work is rolled back, and the application server makes the connection available for another user (after the rollback completes). You can use this option to make the agent structure available to other users.

The DISABLE option is valid for VM users and VSE guests or agents connected to batch or VSE/ICCF applications (identified by APPL in the SHOW ACTIVE display) or via TCP/IP.

You must use CICS commands to stop long-running CICS transactions. (CICS transactions are identified by SUBS in the SHOW ACTIVE display.) To break all online connections, use the CICS CIRT transaction.

When you enter the FORCE command for an in-doubt logical unit of work, the application server makes the agent structure and connection available for other users. For in-doubt units, DISABLE is implicit, and you do not have to specify it.

When you enter the FORCE command for an in-doubt agent involved in DUOW, a warning message is displayed prompting the operator to confirm the force.

When you enter a FORCE command, the application receives a negative SQLCODE (error code) for the current or next SQL request. If the application server is running in VM with SQLDS protocol when you enter the FORCE command, the application will receive either SQLCODE -933 or -948. If the application server is serving only local requesters in a VSE system, the application will receive either SQLCODE -916 or -948 when you enter the FORCE command. The code is dependent on whether a DISABLE was issued along with the FORCE. When DRDA is installed, remote users will receive SQLCODE -30080. For an explanation of these negative SQLCODES see the DB2 Server for VM Messages and Codes manual.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]