how can i generate a sequence number in parallel jobs

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
nandela.sudheer
Participant
Posts: 39
Joined: Mon May 19, 2008 7:22 am

how can i generate a sequence number in parallel jobs

Post by nandela.sudheer »

how can i generate a sequence number in parallel jobs
rameshv
Participant
Posts: 11
Joined: Wed Feb 27, 2008 11:14 pm

Re: how can i generate a sequence number in parallel jobs

Post by rameshv »

[quote="nandela.sudheer"]how can i generate a sequence number in parallel jobs[/quote]



Using surrogate generaator stage
nandela.sudheer
Participant
Posts: 39
Joined: Mon May 19, 2008 7:22 am

Re: how can i generate a sequence number in parallel jobs

Post by nandela.sudheer »

by using Transformer Stage how can i generate the Sequence Number.

rameshv wrote:
nandela.sudheer wrote:how can i generate a sequence number in parallel jobs


Using surrogate generaator stage
rohithmuthyala
Participant
Posts: 57
Joined: Wed Oct 21, 2009 4:46 am
Location: India

Post by rohithmuthyala »

Make the execution mode in transformer as Sequential in stage properties.....keep a counter which adds one for every record..!!
Rohith
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Initialize a stage variable - let's call it svSeqNo - to the partition number (system variable @PARTITIONNUM). Derive it with an expression that increments it by the number of partitions (system variable @NUMPARTITIONS), for example

Code: Select all

svSeqNo + @NUMPARTITIONS
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply