|
Thanks for the answer, actually what I'm trying to do is store some
files into dynamic arrays, ... and I want a binary search for better performance. In that case leave it set up as you have it. Load the file by reading it _without_ specifying that it is a keyed file (that will maximize buffering) and then use SORTA against the KeyEJr array. It will "drag" the other fields along with it into sequence. The you can %lookup against KeyEJr and it will do what you want. If the file gets too big for an RPG array then use qsort and bsearch instead. You might also consider loading the file into a User Space so that it only needs loading once and can be shared between multiple jobs. Jon Paris Partner400 www.Partner400.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.