6/2/08 How to end a job that won't end by itself

Occasionally jobs can get hung up causing them to not end on their own. When this happens, as a last resort, you can use the ENDJOBABN command to force the job to end.

Editor's note: An expanded discussion on this topic can be found here: 10/21/09 Know the impact of using the ENDJOBABN command

Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.


KimKK said...

When using ENDJOBABN, an IPL may be required to actually clear any opened issues from the ended job. I beleive it will also cause the next IPL to be flagged as Abnormal

Vision Solutions said...

The reader is correct on both counts. The command is safe, but should only be used as a last resort when trying to end a job. The IBM manual says the following about the next IPL being flagged as Abnormal.

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

As the tip says, the command is to be used as a last resort. The only other available options for such jobs are ending the sub-system or doing an IPL.