How to run multiple instances of sequencer using dsjob

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
bsreenu
Participant
Posts: 22
Joined: Mon Aug 16, 2004 3:57 pm

How to run multiple instances of sequencer using dsjob

Post 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 ?
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post 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.
bsreenu
Participant
Posts: 22
Joined: Mon Aug 16, 2004 3:57 pm

Post 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.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

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

"You can never have too many knives" -- Logan Nine Fingers
Post Reply