Joined: 02 May 2006 Posts: 7 Location: Charlotte, NC, US
I am currently working on a Reformatting code, I receive a input transaction file having some account & amount fields, Using this i create a o/p file which will add up the amounts for a particular account and then populate a header with the amount total followed by the list of detail transactions, I can have multiple headers in my file each having a set of detail records.
When populating the header i need to know to total amount & all the total no of detail record having the same account in advance. because I need my header written first then only i write the detail records in my o/p file. Also I cant store the individual transactions in an array as the file is very huge its having around 1 Million records.
I can create a header without the summary information(Amount total) and then read the file again just to update the header.
Is there a better solution.
Thanks in advance, I would greatly appreciate your help.