Stopping the execution of a task
You can attempt to stop the execution of a task that is currently running.
About this task
Not all tasks can be canceled as requested. Only the administrative task scheduler that currently executes the task can cancel a JCL task or a stored procedure task.
Procedure
To stop a task that is currently running:
Issue the ADMIN_TASK_CANCEL stored procedure on the Db2 subsystem that is specified in the DB2_SSID
column of the task status.
For a task that is running, the stored procedure cancels the
Db2 thread or the JES job that the task
runs in, and issues a return code of 0 (zero). If the task is not running or if cancellation of the
task cannot be initiated, the stored procedure issues a return code of 12.