You can query and purge tasks that use DBCTL using the CICS® CEMT transaction as for any CICS task. However, if a transaction has "hung" in DBCTL, and you need to purge it, you must use the DBCTL command /STOP THREAD.
To find out what is happening to a task:
I TA SYNTAX OF SET COMMAND Tas(0000110) Tra(DLID) Fac(D2D3) Sus Ter Iso Pri( 001 ) Hty(DBCTL ) Hva(DLSUSPND) Hti(000007) Sta(TO) Use(CICSUSER) Rec(X'9EDA1F61E11CFA02') CEMT Set TAsk() | < All > < PRiority() > < PUrge | FOrcepurge > SYSID=CIC1 APPLID=DBDCCICS PF 1 HELP 3 END 7 SBH 8 SFH 9 MSG 10 SB 11 SF
To do this:
0080 /DIS CCTL DBDCCICS 0080 DFS000I MESSAGE(S) FROM ID=SYS1 047 0080 CCTL PSEUDO-RTKN RECOVERY-TOKEN REGID PSBNAME STATUS 0080 DBDCCICS ATTACHED 0080 9EDA1F61E11CFA02 6 PC3COCHD ACTIVE 0080 9EDA1F4E9B571B02 5 PC3COCHD ACTIVE 0080 *88204/101241*
/STOP THREAD n ABDUMP
where n is the thread
number.
This causes the thread and transaction to terminate when it has finished processing the current request, and causes a dump to be taken.
If the thread does not stop, use:
/STOP THREAD n CANCEL
Do not use /STOP THREAD CANCEL if you do not need to, because it may cause DBCTL to terminate with a U113 abend.