Multiple Instance from Unix

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

Multiple Instance from Unix

Post 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...
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post 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?
Kris

Where's the "Any" key?-Homer Simpson
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

Post 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
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post 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.
Kris

Where's the "Any" key?-Homer Simpson
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

Post 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..
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

From what I know it should be

Code: Select all

dsjob -run project jobname.invocationid
HTH
Kris

Where's the "Any" key?-Homer Simpson
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

dsjob -run project jobname.invocationID
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

Post by avi21st »

ray.wurlod wrote:dsjob -run project jobname.invocationID
Thanks Ray and krish..I would try with this...
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
Post Reply