writting dulicate records in a 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
amitaguptain
Participant
Posts: 12
Joined: Wed Oct 19, 2005 5:29 am

writting dulicate records in a file

Post by amitaguptain »

Hi,

I have a requirement where i need to write the dulicate records occuring in the source file on the basis of some key to the target file.

How can handle this in datastage?
Can i have some counter (constriant )

Thanks,
amie
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes and yes.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
amitaguptain
Participant
Posts: 12
Joined: Wed Oct 19, 2005 5:29 am

Post by amitaguptain »

Can u tell me how to define stage variable in this case
amie
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Run the data through a Sort stage, and get the Sort stage to create a key change column. In a downstream Transformer stage, the key change column will identify the beginning of each group - that is, of each set of duplicates. Constrain on the key change column - where it is reset (0) you have a duplicate.
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