I am scratching my head here with an issue getting a NOTWITH statement to work in the following APPL
JOB A TASKRUN DAILYENDJOB
JOB B TASK SELFCOMPLETING EARLYSUB NOW PLUS 20 SECONDSNOTWITH (A)RUN DAILYENDJOB
ENQSELF is set to NOTALWAYS
What I see is that when the application runs, job B will initially be in a WAITING state and A will start. So far so good
After 20 seconds, B is submitted and I was hoping to see B go into a waiting resource state due to the NOTWITH statement, but B goes immediately to a complete state.
The idea behind this is to use job A as a gatekeeper and submit/resubmit it as required to halt/resume the submission of other jobs in the application. I know I could use resources here, but for reasons I would rather not discuss, I would prefer to use the NOTWITH statement.
What am I missing here?
Hi Chris,I don't see why it didn't work for you.Will you open a support case to check further?Thank you,Lucy
You need a notwith on JOBA too. This is how esp knows to build the behind the scene resource that is used to control notwiths.
Thanks for the reply John, but that is not the behaviour I want.
If I put a NOTWITH(B) on job A, then these jobs would be mutually exclusive and this is not what I desire. I am looking for something asymmetrical i.e. I want job A to be able to start at any time irrespective of whether B is running or not, but B should not start if A is running.
My original problem is that I want a job to be submitted only between 9am and 5pm. If it has not been submitted by 5pm, it will be submitted at 9am the following day
My idea is to have JOB A start at 5pm and run until 9am and so prevent job B running outside 9-5
I do have an alternatove solution that uses resources, but I thought a NOTWITH would be a neat idea