Stage Sequence

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
endyl13
Premium Member
Premium Member
Posts: 44
Joined: Tue Jun 25, 2002 12:47 am
Location: Qatar
Contact:

Stage Sequence

Post by endyl13 »

Dear all,

How can I control the process of Stages that I have inside a job. Until now I only know that we can only control the process of jobs through Job Sequencer, or control the process of Output of Transform stage.

In my case, I have 4 stages in a job, Transform-1,Transform-2,Transform-3,Transform-4. I want to control the stages in the job to run in the correct order:
Transform-1 ==> Transform-2 ==> Transform-3 ==> Transform-4

If I can only do this through Job Sequencer, I need to create 4 jobs (with only 1 stage each) and a Job Sequencer, which is not efficient and easy to maintain for such a simple requirement.

Thank you...

Endy Lambey

Regards

ND
Klaus Schaefer
Participant
Posts: 94
Joined: Wed May 08, 2002 8:44 am
Location: Germany
Contact:

Post by Klaus Schaefer »

Endy,

what do you really want to control??
A records is passed in sequence with the the transforms you are placing.

Klaus
endyl13
Premium Member
Premium Member
Posts: 44
Joined: Tue Jun 25, 2002 12:47 am
Location: Qatar
Contact:

Post by endyl13 »

Klaus,

I think I'd given a bad example. Let's say on the job I have Transform Stage and Container Stage. How can I control the run of the stages? Let's say I want the Transform Stage to be run after the Container Stage run succesfully.

I understand exactly what you meant, but that only applicable for Transform stage with multiple Input and mulitple output, only in one Transform Stage. But in my case, I want control more than 1 stage, and they are also different type of stages.

The only way of doing this is to create separate jobs, and control them through Job Sequencer. But I am new with Datastage (I'm using DataStage XE 5.1), I've been using it only for 1,5 months. I hope it's only because my limited knowledge.

T.I.A
Endy

Regards

ND
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

Endy, normally if you have two independant paths within a job DataStage will try to run them in parallel without giving you much control over the order. One way around this is to turn one of the paths into a dummy reference link. DataStage will first run those data streams that build a reference file such as the loading of hash files. It will then run the remaining data streams. A container, like a hash file, can act as a reference.

You want the container to run first followed by the data stream without sharing the same data. Add a link from your container to a transform in the second data stream. In the transform you will see the container output as a new reference link. Your container will display a list of output fields with a primary key. In the Key Expression column next to the key fields type a value such as "1 <> 1". Now when you run the job the container will execute first followed by the data stream. The data stream will not try to use the container data as the join criteria equates to false.
Post Reply