how to generate a unique sequence number in DataStage

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
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

how to generate a unique sequence number in DataStage

Post 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!
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post 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.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

Post 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!!!
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

If mark the topic, it avoids others to revisit it.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Or run the Transformer stage in Sequential execution mode.
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