Problem solve Get help with specific problems with your technologies, process and projects.

Issuing multiple ENDJOBs for the same job

What are the consequences, if any, of ending a job that is already ending?
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.


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 last published in March 2005

Dig Deeper on iSeries programming commands

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.