Replicating input rows based on condition

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
Gokul
Participant
Posts: 74
Joined: Wed Feb 23, 2005 10:58 pm
Location: Mumbai

Replicating input rows based on condition

Post by Gokul »

Hi ,

I am designing a job which requires , that for each record of source it will replicate the source record N times depending on some condition(ex.N=Number of matching Records found in Hash).

Desgin i used is

Src-----|
|----------------Transform---------->Target
Hash---|

I tried with @outrownum .but could not go further.
I have achieved the solutiin through Unix scripts.
Can this be done in Data Stage.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

If the replication count is the number of matching records in another (hash) file, you can write both in a seq file and use the merge stage to join. There is another thread with similar requirements. Search the forum for more info.
Post Reply