merge Column level

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
New2DS
Participant
Posts: 33
Joined: Sat Jun 26, 2004 9:58 am

merge Column level

Post by New2DS »

Two input flat files with two columns each

Code: Select all

File 1:
Rec_Cnt  Total_Amount
125      5000.00

File 2:
Rec_cnt  Total_Amount
275	 15000.00

OutputFile: Record count from the second file and total amount from the first file.
Rec_cnt  Total_Amount
275	 5000.00
There are no keys in the two files. The way I tried is to add a dummy key to both files and coping one of the file to a hash and doing a lookup on the dummy key and taking the required columns on the output. It worked but like to know is there any efficient way of doing this?

thanks
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Perform a 'paste' command in Unix.
talk2shaanc
Charter Member
Charter Member
Posts: 199
Joined: Tue Jan 18, 2005 2:50 am
Location: India

Post by talk2shaanc »

Through datastage, i dont think there is anything better than the logic you are already using.
Shantanu Choudhary
Post Reply