Page 1 of 1

Job Dependency

PostPosted: Mon Apr 29, 2013 5:11 pm
by vishaljain
Ihave a job X which should run only if jobs A, B, C, D and E are finished. The problem is that jobs A, B, C, D and E will run only if there input files has data in it. Atleast one of the jobs will run but not sure which one.So I am not sure how should I put the dependency in scheduler to run job X. Is there anyway we can do it in scheduler or through JCL?

Re: Job Dependency

PostPosted: Mon Apr 29, 2013 5:51 pm
by NicC
Which scheduler is used? What have your scheduling people told you?

Re: Job Dependency

PostPosted: Tue Apr 30, 2013 11:03 am
by vishaljain
Thanks for looking into it.We have CA7 scheduler. I could find a work around for it. I am putting a empty file check step in jobs A,B,C,D and E so these jobs will be executed everytime and then putting there dependency on job X. So once A,B,C,D and E are finished I will run job X.
So I don't have to go to scheduling people for this.

Re: Job Dependency

PostPosted: Tue Apr 30, 2013 12:06 pm
by NicC
Most places it is the schedulers who update the schedule database and JCL because only authorised people should touch production. If you are doing this yourself then I assume this is for a testing system.

Re: Job Dependency

PostPosted: Tue Apr 30, 2013 7:03 pm
by Anuj Dhawan
vishaljain wrote:Ihave a job X which should run only if jobs A, B, C, D and E are finished. The problem is that jobs A, B, C, D and E will run only if there input files has data in it. Atleast one of the jobs will run but not sure which one.So I am not sure how should I put the dependency in scheduler to run job X. Is there anyway we can do it in scheduler or through JCL?
This is the inference I can make from what you've posted:
IF A AND B AND C AND D AND E executes
    execute X
ELSE
    Don't execute X
END-IF

At IF, there is an "AND" involved for all the Jobs in question which means X can execute only when all these Jobs are executed but, per the bold text from above quoted-text -- you say "atleast one of the jobs will run" -- so what is it -- "Atleast one" or "All of them". It can't be both, you understand, yes?