how to seperate duplicates and unique records from seq file

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
pvijaybe
Participant
Posts: 1
Joined: Tue May 04, 2010 8:41 am
Location: chennai

how to seperate duplicates and unique records from seq file

Post by pvijaybe »

Hi All

I have a sequential file consists of records like (1,2,2,3,4,4,5,6,7)
I require ttwo outputs one should contain(2,2,4,4) and other should contain(1,3,5,6,7)

How can i do this by using which stage?
Can u pls guide me?

Thanks and regards

Vijay
relati
Participant
Posts: 17
Joined: Mon Oct 01, 2007 12:44 pm

Post by relati »

Use transformer stage, route duplicates into one stream and others into another stream. You can do this by checking if the current value is the same as previous value or not with the help of stage variable(s).
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The second person personal pronoun in English is spelled "you" - not "u". U is the name of one of our posters.

Please strive for a professional standard of written English on DSXchange - it makes life easier for those whose first language is not English (like U, for example, who is Burmese nationality working in Singapore).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I would use a fork-join design with an Aggregator stage performing a count. Downstream of the Join stage a Filter, Switch or Transformer stage can direct rows with a count of 1 to one stream and other rows to the other stream.
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