write data with different number of columns to a single file

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
jenny_wang
Participant
Posts: 26
Joined: Mon Nov 19, 2007 2:55 am
Location: Hangzhou

write data with different number of columns to a single file

Post by jenny_wang »

3 output link in a transformer
link1 has 5 columns , like:
1,2,3,5,4
22,33,34,16,33

link2 has 8 columns :

1,2,4,6,5,4,3,5
100,34,23,12,55,65,77,44


link3 has 7 columns:
1,1,34,33,55,4,3
2,4,42,32,44,55,33

i wanna write them into a single file:

1,2,3,5,4
22,33,34,16,33
1,2,4,6,5,4,3,5
100,34,23,12,55,65,77,44
1,1,34,33,55,4,3
2,4,42,32,44,55,33

what kind of stage i can use to get this?
please help!
Alokby
Premium Member
Premium Member
Posts: 9
Joined: Wed Sep 15, 2004 7:27 am

Post by Alokby »

Utilize UNIX cat command, cat file1 file2 file3 > outputfile, in the after routine in the job properties.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You could use a Column Export stage to create a single VarChar column on each link (containing a comma-delimited string), and run the three links into a Funnel stage to combine them.
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