Page 1 of 1

how to generate a unique sequence number in DataStage

Posted: Thu Jan 18, 2007 5:14 am
by vij
Hi all,

How to generate a unique sequence number in DataStage using transformer stage?

I donot want the sequence number to be duplicated and the last record should give the count of number of records, for eg., if i pass 100 records, i should get all the values from 1 till 100 without any holes.

Thanks in advance!

Posted: Thu Jan 18, 2007 5:20 am
by kumar_s
Create Round Robin partition and use the logic that you are using (as specified in your other post). Again it will minimize the so called hole, but not all.
If you are more concern about sequence number, run the job in Sequential mode, atleast the Transformer and use simply @INROWNUM.

Posted: Thu Jan 18, 2007 6:02 am
by vij
kumar_s wrote:Create Round Robin partition and use the logic that you are using (as specified in your other post). Again it will minimize the so called hole, but not all.
If you are more concern about sequence number, run the job in Sequential mode, atleast the Transformer and use simply @INROWNUM.
thanks Kumar, it worked!!!

Posted: Thu Jan 18, 2007 4:34 pm
by kumar_s
If mark the topic, it avoids others to revisit it.

Posted: Thu Jan 18, 2007 7:59 pm
by ray.wurlod
Or run the Transformer stage in Sequential execution mode.