Why do jobs with negative dependencies sometimes run when a job they are negatively dependent on abends?
search cancel

Why do jobs with negative dependencies sometimes run when a job they are negatively dependent on abends?

book

Article ID: 24386

calendar_today

Updated On:

Products

CA 7 Workload Automation

Issue/Introduction

Why do jobs with negative dependencies sometimes run when a job they are negatively dependent on abends?  Jobs with negative requirements cannot run together. However, if a job that is a negative requirement is in the request queue in restart status when a job that is negatively dependent on it submits, it will not hold.

Resolution

When a job with negative dependencies enters the queue, the negative dependencies are "initially posted" requirements. When a job with negative dependencies is ready to submit, a check is made in CA 7 to see if any of the jobs it is negatively dependent on are submitted or active. If so, the job is requeued back to the request queue and the negative requirement is "unposted" to make it a job requirement--meaning that the "unposted" job must complete successfully to post this requirement and let the job move to the ready queue for submission. If the negative dependencies are not active at the time the job is to submit, no dependency is set.

You may want to use VRM instead of negative dependencies because with negative dependencies, it is possible that one of the jobs can abend and others can run. In other words, if you don’t want the jobs to execute at the same time and you don’t want them to execute if any others have failed, use Virtual Resource Management (VRM) with an EXC (exclusive) resource. With this process, you can set whether a job must end successfully to free the resource.