Terminating IMS attachment facility threads

When an application terminates, IMS invokes an exit routine to disconnect the application from Db2. You cannot terminate a thread without causing an abend in the IMS application with which it is associated.

Procedure

To terminate an IMS application, use one of these methods:

  • Terminate the application.

    The IMS commands /STOP REGION reg# ABDUMP or /STOP REGION reg# CANCEL can be used to terminate an application that runs in an online environment. For an application that runs in the DL/I batch environment, the z/OS command CANCEL can be used.

  • Use the Db2 command CANCEL THREAD.

    CANCEL THREAD can be used to cancel a particular thread or set of threads. CANCEL THREAD requires that you know the token for any thread that you want to cancel. Enter the following command to cancel the thread that is identified by a token in the display output:

    -CANCEL THREAD(46)

    When you issue the CANCEL THREAD command, that thread is scheduled to be terminated in Db2.