Since you already have zeroes in the file, the space and reserved and it is possible to do what you want to do (it would also be possible without the zeroes, but more work). It will be very slow. Before you start, you may want to read the
LVM specification. The general idea is the following:
- Find the start of your data. You can do this by searching for the "***End_of_Header**" tags. Depending on your file, there will be one or two before your data starts. After the End_of_Header, the next line is your column headers, the next your data. Position the file pointer at the beginning of the first line so you can start to process the file a line at a time.
- Read in one line.
- Find the position of the first tab in the string and add one.
- Move your file pointer this many bytes forward in the file.
- Write your new value (be careful to use the correct number of digits)
- Move your file pointer to the head of the next line (you can calculate this each time, but it will be a fixed number based on how many columns you have left).
- Repeat 2 - 6 until you hit the end of the file.
If you need help with any of the steps, let us know. The string and file I/O palettes should have all the functionality you need.
Message Edited by DFGray on
02-22-2008 07:17 AM