Effects of the CANCEL THREAD command

A database access thread can be in the prepared state, waiting for the commit decision from the coordinator. When you issue the CANCEL THREAD command for a database access thread that is in the prepared state, the thread is converted from active to indoubt status.

A prepared thread is converted from active to indoubt status in the following circumstances:
  • A DRDA database access thread is in the prepared state and is waiting for the commit decision from the coordinator at the time a CANCEL THREAD command is issued.
  • An RRSAF thread is involved in a z/OS RRS coordinated two-phase commit with two or more resource managers at the time a CANCEL THREAD command is issued.

Begin general-use programming interface information.The conversation with the coordinator and all conversations with downstream participants are terminated, and message DSNL450I is returned. The resources that are held by the thread are not released until the indoubt state is resolved. This is accomplished automatically by the coordinator or by using the command RECOVER INDOUBT.

When the command is entered at the Db2 subsystem that has a database access thread servicing requests from a Db2 subsystem that owns the allied thread, the database access thread is terminated. Any active SQL request (and all later requests) from the allied thread result in a "resource not available" return code.End general-use programming interface information.