Page 1 of 1

How to run multiple instances of sequencer using dsjob

Posted: Thu Jan 06, 2005 5:27 pm
by bsreenu
We have a sequencer which starts 5 Parallel Datastage jobs. The sequencer is started every 1 hour from a shell script using 'dsjob' command. What is the command to run multiple instance of the sequencer? Will the sequencer be able to start all the 5 datastage jobs which may be already running through the previous sequencer instance ?

Posted: Thu Jan 06, 2005 5:44 pm
by vmcburney
You need to make sure your jobs all have the multiple instance property checked. You then need to decide where to split and run the instances. You can do it through the dsjob command by appending an instance ID to the job name and calling it five times. You could do it from the first sequence job where the sequence job calls the same job five times with a different instance ID.

You are apparently using Parallel jobs, why do you need multiple instances? Forgive me if I'm pointing out the obvious but parallel processing is handled automatically by Enterprise version and multiple instances are rarely used.

Posted: Thu Jan 06, 2005 7:07 pm
by bsreenu
Every run of the sequencer will have a new input every hour. So we need to run the sequqncer and the corresponding 5 px jobs(whcih are started by sequencer) ever hour. We are able to pass the invocation id to the sequencer. How do we pass the invocation id to the lower level 5 px jobs. We can see an entry for "Invocation Id Expression', but not sure how to pass Innvocation Id in it.

Posted: Thu Jan 06, 2005 8:08 pm
by vmcburney
For each job stage in your sequence job type into your "Invocation Id Expression" field DSJobInvocationId. This is a macro that returns the invocation ID off the current job. This will then get passed to all child jobs to run with the same ID.

Posted: Thu Jan 06, 2005 8:09 pm
by chulett
This is hacked from a longish post over in the Server forum:
Mike wrote:The easiest way to have a child job inherent the same invocation id as the parent sequence job is to us the macro DSJobInvocationID in the expression for the child job's invocation id.
Edit: (waves at Vincent) :wink: