$ZAPJOB - Remove job structure from job queue

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.

Start of changeYou must take additional precautions when zapping a job that is involved in a dependency network. Before zapping a job, determine if it is currently registered to a dependency network, such as a JOBGROUP or //*NET network. If such a job is zapped, dependencies in the network can become unresolvable. The zapped job is not eligible to be resubmitted into the network. The job group can become unusable.End of change

Start of changeWhen zapping a logging job for a JOBGROUP or //*NET network, you must verify that all jobs involved in the network, including any jobs registered to the network and the logging job itself, are not active in any JES2 process or on any device. Zapping a logging job removes all traces of the network objects from the checkpoint but leaves job structures intact for any jobs registered to the network. Such jobs become orphaned if they were waiting for dependencies to be satisfied and must be canceled and purged to remove them from the SETUP queue. These jobs can be identified by the $HASP1308 message that is issued for each job registered to the dependency network that was zapped.End of change

ZAPJOB does not free any of the track groups (spool space) associated with the job being removed. The track groups are abandoned and will be cleaned up by the JES2 spool garbage collector during its normal 7 day cycle. To clean up any track groups associated with the removed job sooner, you can issue the $T SPOOLDEF,GCRATE=FAST command.

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=JOBnnnnnJ0nnnnnn,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