Previous Page | Next Page

Syntax for the RSUBMIT Statement and Command

KILLTASK Statement

For asynchronous tasks, forces one or more active tasks or server sessions to terminate immediately.
Valid In: client session

Syntax Description
KILLTASK Behavior for z/OS


KILLTASK _ALL_ |task1...taskn ;

Syntax Description


terminates all active asynchronous tasks.


terminates a specific task by a name that corresponds to the server-ID that is associated with the CONNECTREMOTE= option in the RSUBMIT statement.

Restriction: Use the KILLTASK statement only when executing an asynchronous RSUBMIT.
See Also: CONNECTREMOTE= option


The KILLTASK statement enables users to terminate one or more tasks or server sessions that are executing  asynchronously. The KILLTASK statement is useful only for an asynchronous RSUBMIT.

Note:   KILLTASK should be used for asynchronous tasks that seem to be hung or to be having a problem. KILLTASK ends the server session. However, do not substitute KILLTASK for SIGNOFF. Use SIGNOFF to terminate server sessions that are functioning normally.  [cautionend]

KILLTASK causes any log or output lines, as applicable, that have accumulated in the backing store to be sent to the parent Log and Output windows. Before the data is sent to the parent Log and Output windows, this message is displayed:

NOTE: Process TASK1 was terminated by KILLTASK statement.

KILLTASK removes the specified task from the list of active tasks and from the LISTTASK output. If KILLTASK is executed for a completed task, this message is displayed and the task will not be terminated:

NOTE: Transaction TASK2 was not killed because it is not running asynchronously.

Task termination also deletes the content of the WORK library of the server session.

KILLTASK Behavior for z/OS

After you use the KILLTASK statement to kill a server session that runs under z/OS, you must also sign off the server session. If you do not also sign off the server session, your user ID will still be connected to the server session. Here are the methods for signing off a server session:

Consult your z/OS documentation for details about logging on and logging off the z/OS operating environment.

Previous Page | Next Page | Top of Page