Usage notes
Usage notes for preventing the creation of threads, and the options for protected threads.
- 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 might 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.