I formated this data using c#, streamreader and writer and created this csv file. Here is the sample data:
A------B-C-----D------------E------------F-------G-------H---------I
NEW C A123 08/24/2011 08/24/2011 100.00 100.00 X123456 276135
NEW C A125 08/24/2011 08/24/2011 200.00 100.00 X123456 276135
NEW C A127 08/24/2011 08/24/2011 50.00 100.00 X123456 276135
NEW T A122 08/24/2011 08/24/2011 5.00 100.00 X225511 276136
NEW T A124 08/24/2011 08/24/2011 10.00 100.00 X225511 276136
NEW T A133 08/24/2011 08/24/2011 500.00 100.00 X444556 276137
I would like the following output:
NEW C A123 08/24/2011 08/24/2011 100.00 100.00 X123456 276135
NEW C A125 08/24/2011 08/24/2011 200.00 100.00 X123456 276135
NEW C A127 08/24/2011 08/24/2011 50.00 100.00 X123456 276135
NEW C A001 08/24/2011 08/24/2011 350.00 100.00 X123456 276135
NEW T A122 08/24/2011 08/24/2011 5.00 100.00 X225511 276136
NEW T A124 08/24/2011 08/24/2011 10.00 100.00 X225511 276136
NEW T A001 08/24/2011 08/24/2011 15.00 100.00 X225511 276136
NEW T A133 08/24/2011 08/24/2011 500.00 100.00 X444556 276137
NEW T A001 08/24/2011 08/24/2011 500.00 100.00 X225511 276137
With each change in field "I", I would like to add a line, sum column F, add a "A001" to C, and copy the contents
of the other fields into that newly ADDed line. The letters on the columns are for illustrative purposes only. There are no headers.
First, what should I do first? How do I sum column F, copy contents of all fields, and add "A001" to C? How do I add a line and copy the fields w/ each change in I?
Thank you in advance for your help.