Use the CANCEL command to end an active job, started task, or time-sharing
user immediately. The table that follows summarizes the tasks that
the CANCEL command can perform. Following the table are usage notes,
the complete command syntax, definition of parameters, and examples
of use.
If the program that supports the job or started task was designed
to recognize the STOP command, use the STOP command before using the
CANCEL command. If the CANCEL command fails several times, consider
using the FORCE command.
Table 1. CANCEL Command TasksTask - Immediately Terminate: |
Syntax |
- A job in execution
- A running Advanced Program-to-Program Communication/MVS (APPC/MVS)
transaction program
- A started task
|
CANCEL jobname |
- A address space identifier of the work unit you want to cancel
|
CANCEL ASID=asid |
|
CANCEL U=userid |
- A started task
- A MOUNT command
- An external writer allocation
- The output processing for a job
- A z/OS UNIX process
|
CANCEL identifier |
Note: - If your system was part of a global resource serialization ring
(GRS=START, GRS=JOIN or GRS=TRYJOIN was specified at IPL) and the
system is either inactive or quiesced (by entering the VARY GRS(system
name),QUIESCE command), the CANCEL command might not work for jobs
that own any global resources. Use DISPLAY GRS to determine GRS status.
- If a job is running, you can end it using either the CANCEL system
command or the appropriate subsystem command. However, if the job
is not running, you must CANCEL the job using the subsystem command.
- The CANCEL command issues an ABEND with either code 122 or 222
to abnormally end a job step or time-sharing user. The ABEND is asynchronous
and might result in additional errors, depending on which programs
were active at the time of the request. You might need to issue additional
CANCEL commands to completely end the job.
- Entering the CANCEL command during device allocation terminates
the external writer as well as the unit of work. Entering this command
when the external writer is processing output for a job terminates
the output processing but leaves the external writer to process other
data sets.
- When you cancel a MOUNT command for a tape unit, the MOUNT command
can end before the volume has been mounted. If the MOUNT command has
ended and the mount request is not satisfied, issue the UNLOAD command
to free the tape unit.