Issuing multiple ENDJOBs for the same job

Issuing multiple ENDJOBs for the same job

What are the consequences, if any, of ending a job that is already ending?

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts including news, tips, and advice to help you do your job more efficiently and effectively. Stay informed on the hottest topics and biggest challenges faced by IT professionals working with iSeries products and services.

    By submitting your registration information to Search400.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of Search400.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

If you take a look at the HELP TEXT for the ENDJOB command you will see a list of all the possible exception messages that can occur during the execution the command:

CPF1344 Not authorized to control job &3/&2/&1.
CPF1351 Function check occurred in subsystem for job &3/&2/&1.
CPF1352 Function not done. &3/&2/&1 in transition condition.
CPF1359 ENDJOBABN not allowed at this time for job &3/&2/&1.
CPF1360 &3/&2/&1 already ending because of ENDJOBABN.
CPF1361 Job &3/&2/&1 already ending with *IMMED option.
CPF1362 Job &3/&2/&1 has completed.
CPF1363 Job &3/&2/&1 is already ending *CNTRLD.
CPF8172 Spool control block for job &10/&9/&8 damaged.

As you can see, several of these messages make reference to a job already ending.

If you issued an ENDJOB command against a job that you have already ended, you will most likely get *Escape message CPF1363 or CPF1361 if it hasn't ended yet and CPF1362 if it is already ended. There are even a couple of messages that might be displayed if you try to use ENDJOB against a job that was ended using ENDJOBABN. Those are CPF1359 or CPF1360.

Using the F1 key to display a command's HELP TEXT is a great way to understand what exceptions can occur during the execution of a command.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your OS/400 questions -- or help out your peers by answering them -- in our live OS/400 discussion forums.

Ask the Experts yourself: Our OS/400 gurus are waiting to answer your questions.

Check out this Search400.com Featured Topic: 20 ways to ensure a smooth OS upgrade

This was first published in March 2005