Page 1 of 1

Trigger a job based on more than one file.

Posted: Tue May 03, 2016 2:18 pm
by Makrand
Hi,
If I have, for example, 3 dataset say dataset-1, dataset-2 and dataset-3. Can a be job be triggered by the availability of all datasets?

I want to put a condition that the job should get triggered when all the three datasets are available. If only one or two datasets are available then the job should not get triggered.

Re: Trigger a job based on more than one file.

Posted: Tue May 03, 2016 4:00 pm
by Blackthorn
Assuming you're talking about TWS, one dataset will trigger an application with one (or more) jobs in. You cannot wait until all three datasets have been closed before the application is triggered.

What you could do of course is have each of the three datasets trigger three applications that don't actually do anything, e.g.; contain a non-reporting job. Your real job could then be dependent on these three dummy jobs.

Re: Trigger a job based on more than one file.

Posted: Mon May 09, 2016 8:26 am
by Makrand
Thanks for the reply Blackthorn. We have CA-7 but I think I can use the logic in that too.

But what do you mean by this sentence:
You cannot wait until all three datasets have been closed before the application is triggered.
What do you mean by "close"?

Re: Trigger a job based on more than one file.

Posted: Mon May 09, 2016 7:18 pm
by nicc
Obviously you are not a programmer. When a program creates a dataset then it opens it, writes the data and when all data is written the dataset is closed. At that point it becomes available to other programs. Scheduling applications, however, just look to see if the dataset exists - not what state it is in.

Re: Trigger a job based on more than one file.

Posted: Tue May 10, 2016 3:27 pm
by Makrand
Thanks nicc. I did not understand it on first read but now it make sense to me. Thanks for the explanation.

Re: Trigger a job based on more than one file.

Posted: Wed May 11, 2016 3:15 am
by nicc
Or, if the datasets are created by jobs within the same "machine" then have your job have predecessors of the job(s) that creates the 3 datasets.

Re: Trigger a job based on more than one file.

Posted: Wed May 11, 2016 11:45 pm
by Gradus
Hello,
Isnt't it possible to create a runcycle group with two trigger runcycle for this application?
Rergards, Grauds

Re: Trigger a job based on more than one file.

Posted: Thu May 12, 2016 12:03 am
by Gradus
Gradus wrote:Hello,
Isnt't it possible to create a runcycle group with two trigger runcycle for this application?
Rergards, Grauds
..or three trigger runcycle..

Re: Trigger a job based on more than one file.

Posted: Thu May 12, 2016 11:15 am
by Makrand
nicc wrote:Or, if the datasets are created by jobs within the same "machine" then have your job have predecessors of the job(s) that creates the 3 datasets.
Two of them created on the same mainframe and one comes from the other team, not on the same machine. And in future all the files will come from other resources.

Re: Trigger a job based on more than one file.

Posted: Thu May 12, 2016 11:16 am
by Makrand
Gradus wrote:Hello,
Isnt't it possible to create a runcycle group with two trigger runcycle for this application?
Rergards, Grauds
I am not aware about "runcycle group", can you explain it?

Re: Trigger a job based on more than one file.

Posted: Fri May 13, 2016 5:03 pm
by nicc
t "runcycle group", ca
Refer to your scheduling group. You do not actually state which scheduling software you use so the term may vary depending on the software. However, the schedulers should be able to figure it out and they would be able to tell you what term they use.

Re: Trigger a job based on more than one file.

Posted: Mon May 16, 2016 12:33 pm
by Anuj Dhawan
paulaugust wrote:You can trigger the database one what about another two of the database you need to wait or else program you can implement to satisfy your condition it is possible you can go with it
What are you trying to say? 

Re: Trigger a job based on more than one file.

Posted: Mon May 16, 2016 7:58 pm
by nicc
I think he just wanted to say anything, relevant or not. No database has been mentioned and, as written, the sentence is incomplete and gibberish even taking into account that English is nit the person's first language.

Re: Trigger a job based on more than one file.

Posted: Thu Jan 11, 2018 10:12 am
by Makrand
Thanks all. We are using CA-7. I have put File dependency and it seems to work for me as of now.