Thread wait/reuse problem

Dave Raiman

Thread wait/reuse problem
Did you get this figured out? If not, here are some details that
may help.

Protected threads are held in the unused state as previously
indicated for 2 purge cycles (default up to 1 minute).

When the thread is used, the timer is "reset". You can tell if the
threads in question are being used by looking at the REQ column of
the DB2 "-DISPLAY THREAD(*)" command output.

When the threads are allocated (ST = "T" on the -DISPLAY output),
you cannot bind the associated plan due to the in-use condition.

If you stop DSNC (presumably with the "DSNC STOP" command), after
the existing transactions have completed their unit-of-work, all
threads from that CICS region should be gone. Watch out if you have
more than one CICS region connected to that DB2. You can see if the
attach has stopped by waiting for the DSNC transaction to disappear
from the "CEMT I TAS" display. Purging the DSNC transaction might
leave a mess and is not recommended.

Better than stopping the attach (which appears like a DB2 outage in
the CICS region) is to prevent new transactions from coming in that
run in that RCT entry. There are a few different ways to do this in
CICS (ex disabling the transactions, setting the MAXACTIVE to zero,
etc.). Then after the timeout period, all the threads should
disappear (revert to "N" status on the -DISPLAY THREAD output).

Dave (remove "nospam" from the reply addr)