RPGIV @ Work

A unique site for RPG and System i Lovers

Welcome!

Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

End Job Abnormal (ENDJOBABN) Print E-mail
User Rating: / 0
PoorBest 
Written by Chamara Withanachchi   

The End Job Abnormal (ENDJOBABN) command ends a job that cannot be ended successfully by running the End Job (ENDJOB) command with *IMMED specified for the How to end (OPTION) parameter. 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 be attempted.


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:


  • Journaling entries
  • Commitment control

    Before ending the job abnormally, you should verify that no logical unit of work is in an in doubt state due to a two-phase commit operation that is in progress. If it is, then pending committable changes at this system will not be committed or rolled back. Therefore, database integrity may not be maintained on all related systems. For specific instructions on how to determine these conditions, and for a description of all the impacts of ending this job abnormally under these conditions, see the Commitment control article in the Information Center.


  • Making database files available for use by others
  • Releasing file locks

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


  • When the job runs under a subsystem monitor that is hung, is abnormally slow, or has ended abnormally (the subsystem monitor performs part of the ending function).
  • When the machine interface (MI) instruction running in the job is hung or is abnormally slow. The job cannot end until the MI instruction that is currently running completes or reaches a point of interruption.

Restrictions:


  1. 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.

  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 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 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 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.
    • When the Power Down System (PWRDWNSYS) command with OPTION(*IMMED) is issued.
  6. If the job defines a handler for the asynchronous signal SIGTERM, the immediate ending of the job was delayed to allow the SIGTERM signal handler to run. For more information, refer to system value QENDJOBLMT. An ENDJOBABN command is not allowed while the SIGTERM signal handler is running. If the SIGTERM signal handler has run for at least 2 minutes, use ENDJOB command with OPTION(*IMMED) to stop the SIGTERM signal handler.
Top

Parameters

Keyword Description Choices Notes
JOB Job name Qualified job name Required, Positional 1
Qualifier 1: Job name Name
Qualifier 2: User Name
Qualifier 3: Number 000000-999999
DUPJOBOPT Duplicate job option *SELECT, *MSG Optional
<Previous   Next>