concatenate

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
IBMDS
Participant
Posts: 20
Joined: Thu Nov 09, 2006 1:58 pm

concatenate

Post by IBMDS »

Hello,

I getting the source like this

ABCD 1 TCTSV03
ABCD 2 RAP
ABCD 3 JPG

I would like get the output

ABCD 1 TCTSV03RAPJPG
ABCD 2 TCTSV03RAPJPG
ABCD 3 TCTSV03RAPJPG

Thanks in Advance
DS
IBMDS
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Spell your requirements out in words. That would help both us and yourself as well.
-craig

"You can never have too many knives" -- Logan Nine Fingers
IBMDS
Participant
Posts: 20
Joined: Thu Nov 09, 2006 1:58 pm

Post by IBMDS »

The source file contains the data in different lines for one group. i need to concatenate the col3 for particular group and populate for all the lines in that group.


Col1 Col2 col3

ABCD 1 TCTSV03
ABCD 2 RAP
ABCD 3 JPG

I would like get the output

Col1 Col2 col3
ABCD 1 TCTSV03RAPJPG
ABCD 2 TCTSV03RAPJPG
ABCD 3 TCTSV03RAPJPG
IBMDS
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

You require two passes thru the data. The first pass is to build the concatenated result, then second is to put that result on all constituent rows.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
IBMDS
Participant
Posts: 20
Joined: Thu Nov 09, 2006 1:58 pm

Post by IBMDS »

Could you tell me how to build the concatenated result. My source is a sequential file.

Thanks in Advance
DS
IBMDS
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post by Teej »

--> Transformer --> Remove Duplicate --> Lookup. One link feed the Remove duplicate, and another link is the primary to Lookup. First link feed the appending of values, and you get the last value for the remove duplicate. Feed it to Lookup as reference link.

That's just one solution of many that can be done here.
kab123
Participant
Posts: 92
Joined: Tue May 18, 2004 4:05 pm

Post by kab123 »

I believe a pivot stage can do this.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Care to explain how?
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