Since there are as many was to solve this challenge as there are creative
thinkers, I will add my .02 worth.
At the beginning of the job you could build a file;
:IF FINFO('JOBFILE.GROUP.ACCOUNT',"exists")
: TELL !HPJOBNAME,!HPUSER.!HPACCOUNT You can't execute this job now.
: TELL !HPJOBNAME,!HPUSER.!HPACCOUNT It is already executing.
: TELL !HPJOBNAME,!HPUSER.!HPACCOUNT Try again later
: EOJ
:ELSE
: BUILD JOBFILE.GROUP.ACCOUNT;DISC=1
:ENDIF
The last step in the jobstream would be to delete the file created at the
beginning.
This serves a two fold purpose.
1. It keeps multiple copies of this job from running together.
2. If the job aborts it keeps this job from running until the file is manually
purge (assuming the error has been investigated)
You can also make the IF statement more elaborate, depending on your needs.
I hope my two cents helps.
L. A. Barnes