Hi All
I am gettin data like this ... and gettin duplicates ( in green).
A B C D
1 2 3 X
1 4 5 Y
1 2 3 Z
5 8 4 C
1 2 3 K
Output should be as below...to be written to a Hashed file with A, B, C as Keys
A B C D
1 2 3 X : Z :K
1 4 5 Y
5 8 4 C
Please forward some suggestions on how to do this.
Thanks..
Concatenate duplicate values..
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 41
- Joined: Tue Jan 24, 2006 3:43 pm
- Location: United States
- Contact:
Concatenate duplicate values..
Knowledge is Power
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Lookup against the hashed file and construct D then write back to the hashed file.
Disable both read cache and write cache, and lock for update when performing the lookup.
Disable both read cache and write cache, and lock for update when performing the lookup.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Re: Concatenate duplicate values..
1)First sort the data and
2)then in transformer use the persistent stage variables like svCurrentA, svPreviousA, svCurrentB....etc to compare the current and previous values of the first 3 columns,
3)and concatenate the values of the fourth column as long as current and previous values are equal. Flush the row to output when the comparison evalutes to false.
2)then in transformer use the persistent stage variables like svCurrentA, svPreviousA, svCurrentB....etc to compare the current and previous values of the first 3 columns,
3)and concatenate the values of the fourth column as long as current and previous values are equal. Flush the row to output when the comparison evalutes to false.