Hi,
I have a big (more than a GB) textfile with a lot of fields in it out of which I wan't to extract a few fields and put these in a new textfile.
The textfile (ORIGNINAL.txt) is representing basic data of a lot of companies. The even lines have a fixed layout like this:
[tt]
Field|Length|Beginning of the field|Description
_______________________________________________
1| 9| 1|Id
2| 2| 10|Record type
3| 8| 12|Date
...
27| 4| 150|Amount of ratios in line 2
_______________________________________________
[/tt]
The uneven lines have an amount of ratios, the amount is described in field 27 in the previous line.
I want to make a textfile (RESULT.txt) where each line represents a ratio of a company. So the structure would be:
the company id + ratioid + ratio for year 2 + ratio for year n-1 - new line ....
So for each company you get as much lines as there are ratios of wich the amount is in field 27 in the previous line.
I don't know if this explanation is clear enough, anyhow I hope somebody can help me.
I have a big (more than a GB) textfile with a lot of fields in it out of which I wan't to extract a few fields and put these in a new textfile.
The textfile (ORIGNINAL.txt) is representing basic data of a lot of companies. The even lines have a fixed layout like this:
[tt]
Field|Length|Beginning of the field|Description
_______________________________________________
1| 9| 1|Id
2| 2| 10|Record type
3| 8| 12|Date
...
27| 4| 150|Amount of ratios in line 2
_______________________________________________
[/tt]
The uneven lines have an amount of ratios, the amount is described in field 27 in the previous line.
I want to make a textfile (RESULT.txt) where each line represents a ratio of a company. So the structure would be:
the company id + ratioid + ratio for year 2 + ratio for year n-1 - new line ....
So for each company you get as much lines as there are ratios of wich the amount is in field 27 in the previous line.
I don't know if this explanation is clear enough, anyhow I hope somebody can help me.