How to run multiple instances of sequencer using dsjob
Moderators: chulett, rschirm, roy
How to run multiple instances of sequencer using dsjob
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 ?
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
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.
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.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
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.
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
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.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
This is hacked from a longish post over in the Server forum:
Edit: (waves at Vincent)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.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers