z/OS JES2 Commands
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


$ZAPJOB - Remove job structure from job queue

z/OS JES2 Commands
SA32-0990-00

Function

To remove all traces of a job structure from the JES2 job queue.

WARNING: If improperly used, the ZAPJOB command can cause JES2 ABENDs, including ABENDs on multiple systems. Be sure to review the entire documentation before you use this command.

ZAPJOB can be used to remove all traces of a job structure from the JES2 job queue. It is intended to be used in situations where a job cannot be removed using normal JES2 commands or by a JES2 restart. You must take special care to ensure that the job and any output it may have created are not active in any JES2 process and not active on a device. Zapping a job that is active can lead to ABENDs and the loss of a PCE until JES2 is restarted. ZAPJOB will not correct queue errors. If the JOB or output queue has an error, a JES2 restart is needed to rebuild the job queue.

When specifying a job to zap, IBM® recommends that you specify as many operands as are known for the job being zapped. This reduces the possibility of accidentally zapping the wrong job because of a typing error.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-$ZAPJOB--+---------------------------------+----------------->
            '-,--JOBID--=--JOBnnnnn--J0nnnnnn-'   

>--+--------------------------+--+-------------------------+---->
   '-,--JOBKEY--=--xxxxxxxxxx-'  '-,--JOBNAME--=--cccccccc-'   

>--+----------------------+--+----------------------+----------><
   '-,--JQEINDEX--=--xxxx-'  '-,--JQEOFF--=--xxxxxx-'   

Parameters

JOBID=
The JES2 JOBID of the job to be zapped. This can be specified in any of the valid formats for a JES2 JOBID, such as J12345, JOB12345, S12345, STC12345, T12345, TSU12345. JOBID= is an optional keyword.
JOBKEY=
The hexadecimal job key that is associated with the job. This value is normally obtained from a dump. If JOBKEY=0 is specified, then JOBID=, JQEINDEX= or JQEOFF= must also be specified. JOBKEY= is an optional keyword.
JOBNAME=
The name of the job to be zapped. JOBNAME cannot be specified by itself. JOBID=, JOBKEY=, JQEINDEX, or JQEINDEX= must also be specified. JOBNAME= is an optional keyword.
JQEINDEX=
The index (in hexadecimal) of the JQE to be zapped. JQEINDEX is normally obtained from a dump. JQEINDEX= is an optional keyword.
JQEOFF=
The offset (in hexadecimal) of the JQE to be zapped. JQEOFF is normally obtained from a dump. JQEOFF= is an optional keyword.

Messages

The command response is a $HASP000 message. The $HASP250 message is issued when the job is zapped and indicates that the job was removed from the job queue structure (the job was zapped).

Note:
  1. One of JOBID=, JOBKEY=, JQEINDEX=, or JQEOFF= must be specified on ZAPJOB.
  2. If a job has a job key of zero (job has not had a job key assigned or has partially purged), you must specify JOBKEY=0, JQEINDEX=, or JQEOFF= to zap the job.
  3. A $ZAPJOB statement can be placed in the initialization deck. This is not the same as using the ZAPJOB initialization statement. A $ZAPJOB command in the initialization deck is processed after JES2 initialization has completed. A ZAPJOB initialization statement removes the job before verifying the job queue. Because of the risk of forgetting to remove it, IBM recommends that you do not place $ZAPJOB commands in the initialization deck.

Example

 1 
.zapjob,jobname=spin01,jobid=j8 

 JOB00008 .HASP250 SPIN01 ZAPPED -- (JOB KEY WAS B379D031) 
 .HASP000 OK 

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014