Page 1 of 1

Sequencer with few stage to call multiple parallel

Posted: Fri Oct 05, 2012 5:10 am
by smile.achieve
I have 25 parallel jobs that need to be executed in a order. Need a suggestion where i need not add 25 stages to the Sequncer job instead pass the parallel job name to one stage and get them executed.




Ranjan

Posted: Fri Oct 05, 2012 5:18 am
by ArndW
Unfortunately, I can't think of a way to do that with different job names. If it were one job that is multi-instance then a sequece could loop through the instances, but that is not the case here.

If it is any consolation, I have a sequence right now that has over 60 different jobs and each of those has from 15-25 parameters that need to be filled in each time. It isn't a great job to fill that in, but needs to be done.

Posted: Fri Oct 05, 2012 5:43 am
by ray.wurlod
You could write your own Job Control routine. This is the old-fashioned way, and requires some skill with DataStage BASIC code, but may solve your particular problem.

Posted: Fri Oct 05, 2012 7:45 am
by chulett
Does your list of 25 jobs change? If not, just add the 25 stages to the Sequence job - what's the concern with doing that? :?

Posted: Tue Oct 09, 2012 3:50 am
by smile.achieve
@chulett : Yes the number of jobs could be changed. Hence i was looking for a passing job name kind of approach method.

I would appriciate if you could suggest any good method to do this?

Posted: Tue Oct 09, 2012 4:59 am
by ArndW
You can't do it simply in a job sequence, since call to jobs in sequences are effectively hard-coded at compile-time.

There is the command-line "dsjob -run" invocation method which you could call from within a loop in a job sequence, or you could use the DataStage API BASIC calls directly in a loop as well.

Posted: Tue Oct 09, 2012 7:24 am
by chulett
I would echo Ray's Job Control suggestion but it does involve a level of knowledge of BASIC and the API. Or as Arnd notes, script it using dsjob.

Posted: Tue Oct 09, 2012 10:21 am
by eph
Hi,

You could check the UtilityRunJob routine which should be part of /Routines/sdk/Utility to get an idea of how you could handle this scenario.

Regards
Eric