CSV file horizontal formatting
Hi folks,
Please help me with csv file formatting which needs to be done in horizontal fashion.
I have data coming in separate files every hour. What I need to do is extract three values into csv file. In the next hour, I need to extract the new values beside the three values which were extracted last hour in the same csv file. This process continues for every hour. Please find below example of the same.
File_1st_hr
server1,alarm1,1000
server2,alarm2,1001
server3,alarm3,1002
File_2nd_hr
server4,alarm4,1003
server5,alarm5,1004
File_3rd_hr
server7,alarm7,1006
server8,alarm8,1007
server9,alarm9,1008
server6,alarm6,1005
Output csv file should look like as below
0000 hrs,,,0100 hrs,,,0200 hrs
server1,alarm1,1000,server4,alarm4,1003,server7,alarm7,1006
server2,alarm2,1001,server5,alarm5,1004,server8,alarm8,1007
server3,alarm3,1002,,,,server9,alarm9,1008
,,,,,,server6,alarm6,1005
I hope my query is clear. Your inputs will be appreciated.
Thanks,
Harsha
Last edited by vharsha; 09-20-2010 at 06:08 AM..