monasu1998
Active User
Joined: 23 Dec 2005 Posts: 176 Location: India
|
|
|
|
Hi,
I have a file which has a header record and remaining dta record. I want to sort the data based on some currency code it is easy to do.
my queastion here is how can I write the the header record and the sorted data records to my output file?
Example:
Input file:
DATE | LOCATION | CURRENCY | RATE |
20121108 | NY | AUD | 00000045654 |
20121108 | NY | AED | 00000023450 |
20121108 | NY | ART | 00000012345 |
I want my sort file to be
DATE | LOCATION | CURRENCY | RATE |
20121108 | NY | AED | 00000023450 |
20121108 | NY | ART | 00000012345 |
20121108 | NY | AUD | 00000045654 |
Do I need to split the file for header and data first, sort the data file and finally merge the header and data file?
Thanks |
|