ENDJOBABN (End Job Abnormal)

ENDJOBABN Command syntax diagram

 

Purpose

The End Job Abnormal (ENDJOBABN) command ends a job that cannot be ended successfully by running the End Job (ENDJOB) command with OPTION(*IMMED) specified. The ENDJOBABN command cannot be issued against a job until 10 minutes have passed following the request for immediate ending. This allows sufficient time for normal job ending functions to occur.

When the ENDJOBABN command is issued, most of the end-of-job processing is bypassed (including spooling of the job log, the end of job display for interactive jobs, and the end-of-job processing for the specific functions that are being performed). The part of the end-of-job processing that is attempted is allowed only five minutes to complete. If it does not do so in five minutes, the job is forced to end at that point. Because some of the job cleanup is not performed, the ENDJOBABN command should only be used when a job that is in the process of immediate ending does not finish ending and resources in use by the job are needed by another job or by the system. When the ENDJOBABN command is used, some resources in use by the ended job may be left unavailable until the next IPL.

Use of the ENDJOBABN command causes the next system end to be marked as ABNORMAL. Certain system functions are then called during the subsequent IPL to clear up conditions that may have resulted from running the ENDJOBABN command. This does not, however, cause any machine recovery functions to be called, nor do any access paths need to be rebuilt. Some storage in use by the job may become unavailable after the ENDJOBABN command is run and that available storage can be reclaimed by using the Reclaim Storage (RCLSTG) command.

Bypassing the job log writing process causes the job to have the status of JOBLOG PENDING (as shown on the DSPJOB status attributes display) after it has been ended with the ENDJOBABN command. The job log writing is not performed until the next IPL. However, the contents of the job log can be printed or shown by using the Display Job Log (DSPJOBLOG) command.

When the ENDJOBABN command is run, the following functions are performed successfully:

This command fails to end a job or takes more than five minutes to do so in the following situations:

 

Restrictions

  1. This command is shipped with public *EXCLUDE authority and the QPGMR, QSYSOPR, and QSRV user profiles have private authorities to use the command.
  2. The issuer of the command must be running under a user profile which is the same as the job user identity of the job being ended, or the issuer of the command must be running under a user profile which has job control (*JOBCTL) special authority.

    The job user identity is the name of the user profile by which a job is known to other jobs. It is described in more detail in the Work Management Link to PDF book.

  3. After the ENDJOBABN command is run, subsequent ENDJOBABN commands cannot be issued against the job.
  4. Users cannot end a reader, writer, subsystem monitor, or system job.
  5. Users cannot run the ENDJOBABN command until ten minutes after immediate ending of the job is started. Immediate ending of the job is started in the following ways:

    • When the End Job (ENDJOB) command with OPTION(*CNTRLD) is specified and the delay time ends
    • When the End Job (ENDJOB) command with OPTION(*IMMED) is issued
    • When the End Subsystem (ENDSBS) command with OPTION(*CNTRLD) is issued against the subsystem in which the job is running and the delay time ends
    • When the End Subsystem (ENDSBS) command with OPTION(*IMMED) is issued against the subsystem in which the job is running
    • When the End System (ENDSYS) command with OPTION(*IMMED) is issued, or OPTION(*CNTRLD) is issued and the delay time ends

 

Required Parameters

JOB
Specifies the name of the job to be ended. If no job qualifier is given, all of the jobs currently in the system are searched for the simple job name. If more than one of the specified names are found, a qualified job name must be specified to distinguish them.

A job identifier is a qualified name with up to three elements. For example:

job-name
user-name/job-name
job-number/user-name/job-name

More information on this parameter is in Commonly used parameters.

job-name: Specify the name of the job to be ended.

user-name: Specify the name of the user of the job to be ended.

job-number: Specify the number of the job to be ended.

 

Optional Parameters

DUPJOBOPT
Specifies the action taken when duplicate jobs are found by this command.

*SELECT: The selection display is shown when duplicate jobs are found during an interactive session. Otherwise, a message is issued.

*MSG: A message is issued when duplicate jobs are found.

Example for ENDJOBABN

ENDJOBABN  JOB(000310/SMITH/PAYROLL)

This command ends the batch job 000310/SMITH/PAYROLL after the failure of an earlier attempt to end it with the ENDJOB command. The ENDJOBABN command can be issued only after waiting at least ten minutes for the job to end after issuing the ENDJOB command.

Error messages for ENDJOBABN

*ESCAPE Messages

CPF1317
No response from subsystem for job &3/&2/&1.
CPF1321
Job &1 user &2 job number &3 not found.
CPF1332
End of duplicate job names.
CPF1340
Job control function not performed.
CPF1341
Reader or writer &3/&2/&1 not allowed as job name.
CPF1342
Current job not allowed as job name on this command.
CPF1343
Job &3/&2/&1 not valid job type for function.
CPF1351
Function check occurred in subsystem for job &3/&2/&1.
CPF1359
ENDJOBABN not allowed at this time for job &3/&2/&1.
CPF1360
&3/&2/&1 already ending because of ENDJOBABN.
CPF1362
Job &3/&2/&1 has completed.