I have (2) files the master file and the index file. I want to sort the master file and then the indexed file separately. Any suggestions on how I might go about this? I am new to indexed files.
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.
You've got to explain what you're trying to do in a little more detail.
Do you read the master, find the matching index rec and combine some data fronm both and write a rec to a new file? Do you read the indexed, match it to the master? What is the purpose of the pgm? You said you want to sort the files. Why?
The purpose of the program is that I want to sort by last name and first name from the master file and it's indexed file and display all the records on the screen. I am not sure how to go about it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.