Hi BEA,
An indexed file usually presumes a defined sequence dictated by the key values of the index field(s). Usually you sort the flat file in the sequence of the indexed file.
However, if the indexed file is appreciably smaller (# of recs) than the flat file you may want to copy the indexed file and sort it in the sequence of the orig flat file.
How to sort the files depends on the platform you're running on. Why don't you let us know; my background is in mainframes, but I'm sure there's plenty of help out there for the other platforms. So let us know. Also, if you have any code to show us, that can give an insight for what you're trying to do and the problems you face.
Thanx, Jack.