Concatination

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
moulicherukuri
Participant
Posts: 5
Joined: Sat Apr 26, 2008 1:00 pm

Concatination

Post by moulicherukuri »

Hi Guys
I need an Idea to implement the following logic
Can any one suggest me

My Src seems like

ID---SEQNO---MSG
100--- 1--- X
200--- 1--- Y
300--- 1--- A
300--- 2--- B
300--- 3--- C
400--- 1--- A
400--- 2--- B

Output should be like
ID---- MSG
100--- X
200--- Y
300--- A||B||C
400--- A||B
Concatination should be done in the SEQNO order.
abhijitg
Premium Member
Premium Member
Posts: 10
Joined: Sun Aug 22, 2010 9:54 am
Location: Charlotte, NC

Post by abhijitg »

Hi,

I would first sort the incoming records on ID and SEQ. I would then create two variables CurrentID and PrevID in your transformer. If the CurrentID=PrevID Then MSG=MSG:in.MSG Else MSG=in.MSG. The PrevID=CurrentID assignment should the last thing you do in the transformer.

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

Post by ray.wurlod »

Use a downstream Remove Duplicates stage to pass only the last in each group.

Or upgrade to version 8.5 where you can do loop processing within the Transformer stage.
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