DSNC DISCONNECT

Use DSNC DISCONNECT to disconnect threads. This command provides manual control to release resources being shared by normal transactions so that special purpose processes, such as Db2® utilities, can have exclusive access to the resources.

Abbreviation

  • DSNC DISC
  • DISC (using the DISC transaction from the CICS® Db2 sample group DFH$DB2®)

Environment

This command can be issued only from a CICS terminal.

Authorization

Access to this command is controlled by CICS transaction security for the DSNC transaction and by CICS command security for the DB2CONN resource. This command requires READ access.

For more information about CICS security, see Security in a CICS Db2 environment.

Syntax

Read syntax diagramSkip visual syntax diagram DSNC DISConnect plan-name

Parameters

plan-name
Specifies a valid application plan.

Usage notes

DSNC DISCONNECT does not prevent threads from being created on behalf of transactions. The command only causes currently connected threads to be terminated as soon as they are not being used by a transaction. To interrupt a transaction and cancel a thread faster, you can use the Db2 CANCEL THREAD command. You can stop the transactions associated with a particular plan ID in CICS with the MAXACTIVE setting for TRANCLASS. This prevents new instances of the transaction from causing a re-creation of a thread.

You might want to deallocate a plan for rebinding or for running a utility against the database. If you are using a protected thread, use either of the following commands, rather than DSNC DISCONNECT, to send all the threads to the pool:
  • EXEC CICS SET DB2ENTRY(entryname) THREADLIMIT(0)
  • DSNC MODIFY

The protected thread terminates on its own within two purge cycles. See the PURGECYCLE attribute of DB2CONN.

Example

The following command disconnects active and protected threads for plan TESTP05:
DSNC DISC TESTP05

Figure 1 is a sample output from the command.

Figure 1. Sample output from DSNC -DISCONNECT command
 
 DFHDB2021 07/09/** 13:46:29 IYK4Z2G1 The disconnect command is complete.