Page 1 of 1

Multiple Instance from Unix

Posted: Tue Oct 03, 2006 1:47 pm
by avi21st
Hi

I have a requirement to run a single Datastage job sequencer for different files for in same format at the same time...

But I do not need to create physical job sequencers for each one...I am scheduling the Job sequencers via Unix cron using DSJOB -run

How can I call the same job from Unix script at the same time

Say I run DSJOB1 for File1....and the job is running ...I need to run the same DSJOB1 for File2 but using some kind of invocation id logic


please help...

Posted: Tue Oct 03, 2006 1:54 pm
by kris007
You can create the job as a Multi-Instance job and then pass the invocation id as a parameter from the command line. Wouldn't that solve your problem?

Posted: Tue Oct 03, 2006 2:32 pm
by avi21st
kris007 wrote:You can create the job as a Multi-Instance job and then pass the invocation id as a parameter from the command line. Wouldn't that solve your problem?
Thanks Kris but I do not want to create a physical job...each job in my casew ould be for a Dealer and I have say 20,000 Dealer so that would be huge number of jobs

Posted: Tue Oct 03, 2006 2:43 pm
by kris007
I didn't mean to create 20,000 jobs. Since you say you have 20,000 dealers I am assuming you would have around 20,000 files and would need to run the same job that many times. Allowing a job to be a Multi-Instance job allows you to do exactly what you want. All you have to do is go to the job properties and check the "Allow Multiple Instance" option. With that selected you can run any number of instances of your job(i.e. run the same job any number of times) as long as you provide unique invocation id's. That is the easiest way I am aware of unless I got your requirement totally wrong.

Posted: Tue Oct 03, 2006 3:52 pm
by chulett
Your other option would be to concatenate all of the files you need to process into one large 'work' file and then process that rather than running a jillion instances of the job.

Posted: Tue Oct 03, 2006 4:18 pm
by avi21st
kris007 wrote:I didn't mean to create 20,000 jobs. Since you say you have 20,000 dealers I am assuming you would have around 20,000 files and would need to run the same job that many times. Allowing a job to be a Multi-Instance job allows you to do exactly what you want. All you have to do is go to the job properties and check the "Allow Multiple Instance" option. With that selected you can run any number of instances of your job(i.e. run the same job any number of times) as long as you provide unique invocation id's. That is the easiest way I am aware of unless I got your requirement totally wrong.

I understand that but how can I kick of that job in Unix...via DSJOB -RUN

Aso for DSJOB -RUN I need the Datastage job name as one of the parameters...can I give something like alias.datastage job name.

Then I can run the job multiple times..

Posted: Tue Oct 03, 2006 4:55 pm
by kris007
From what I know it should be

Code: Select all

dsjob -run project jobname.invocationid
HTH

Posted: Tue Oct 03, 2006 4:55 pm
by ray.wurlod
dsjob -run project jobname.invocationID

Posted: Tue Oct 03, 2006 11:25 pm
by avi21st
ray.wurlod wrote:dsjob -run project jobname.invocationID
Thanks Ray and krish..I would try with this...