× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.