|
Hi,
I have a flat file, which has fields delimited by field separators and a 2
character field tag. The actual fields are variable length, so not in a
fixed position.
For example, my field separator is hex '1C' and the field tags are A1 thru
A6. Tag A1 denotes First name, A2 Last name, A3 Address Line 1, A4 Address
Line 2 etc.
I want to sort by last name, which will be a variable length field, and
could occur anywhere in the record (as the First name is also of variable
length). It will always be enclosed between hex '1C'A2 and hex '1C' (it
will never be the first or the last field in the record).
What would be the best way of doing this? (The only solution I have is to
write a program to create an intermediate file, with the Last Name as a
separate field).
The file is actually 4000 bytes and has about 18 million records, but this
would be a one time effort.
TIA
Vinay
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.