Combining rows into a single row

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
datisaq
Participant
Posts: 154
Joined: Wed May 14, 2008 4:34 am

Combining rows into a single row

Post by datisaq »

In Datastage parallel edition, how can we combine the rows coming from the input link into a single row. Say for example:-

I/P:-

COLA
---------
A
B
C
D

O/P:-

COLB
-------
ABCD


It sounds something like vertical pivoting but here the number of columns at both ends are equal..

I'm having only one column at the input but at the output the coulmn length should be very large to accomodate all the records.

Any help will be appreciated greatly..
IBM Certified - Information Server 8.1
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Wonder why someone will need to do that.

Especially if there is only one column.

The options are
1.) if output is seq file, write with rec delim as none.
2.) if source is seq file, you can remove newline using unix utilities.
datisaq
Participant
Posts: 154
Joined: Wed May 14, 2008 4:34 am

Post by datisaq »

Thanks for the help i got it..
IBM Certified - Information Server 8.1
Subhajit
Participant
Posts: 1
Joined: Thu Aug 20, 2009 5:40 am
Location: India

Post by Subhajit »

Sainath.Srinivasan wrote:Wonder why someone will need to do that.

Especially if there is only one column.

The options are
1.) if output is seq file, write with rec delim as none.
2.) if source is seq file, you can rem ...
hey yar try to giv the answer okies.
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

Subhajit,

Pls reply in proper professional language.


Regards
Sreeni
ds_teg
Premium Member
Premium Member
Posts: 51
Joined: Tue Aug 11, 2009 6:53 am
Location: Chicago

Post by ds_teg »

cat filename | tr '\n' ' '
ds_teg
Premium Member
Premium Member
Posts: 51
Joined: Tue Aug 11, 2009 6:53 am
Location: Chicago

Post by ds_teg »

cat filename | tr '\n' ' '
Post Reply