DSNC DISCONNECT

The CICS® DB2® attachment facility command DSNC DISCONNECT disconnects threads.

The 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.

Environment

This command can be issued only from a CICS terminal.

Syntax

Read syntax diagramSkip visual syntax diagramDISC syntax
 
>>-DSNC DISConnect  --plan-name--------------------------------><
 

Abbreviation

DSNC DISC or DISC (using the DISC transaction from the CICS DB2 sample group DFH$DB2).

Authorization

Access to this command can be controlled using the following CICS authorization checks:

Parameter description

plan-name
Specifies a valid application plan.

Usage notes

Preventing creation of threads
The command 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.

Alternative for protected threads
You may want to deallocate a plan for rebinding or for running a utility against the database. If you are using a protected thread use EXEC CICS SET DB2ENTRY(entryname) THREADLIMIT(0), or DSNC MODIFY rather than DSNC DISCONNECT, to send all the threads to the pool. The protected thread terminates on its own within two purge cycles. See the PURGECYCLE attribute of DB2CONN.

Example

Disconnect active and protected threads for plan TESTP05:

 
            DSNC DISC TESTP05

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

Related concepts
CICS-supplied transactions for CICS DB2
Issuing commands to DB2 using DSNC
DSNC DISPLAY
DSNC MODIFY
DSNC STOP
DSNC STRT
[[ Contents Previous Page | Next Page Index ]]