|
Rob, Obvious choice here would be qsort() (and bsearch() if you subsequently want to search the array). There are some basic examples in the Sorcerers Guide. I believe Scott is doing an article in the December issue of iSeries News about the various different sorting/searching methods - how well they perform, how easy they are to implement & code etc. Also, I have written an article which will appear in the November issue of iSeries News which shows how to easily 'wrapper' the qsort() and bsearch() API's into a service program which requires no additional coding of callback procedures etc, as well as allowing sorting/searching using case-insensitivity, subsetted data, *LT/*LE/*EQ/*GE/*GT searching etc. Both these will be too late for you right now, but if you email me, I can send you the code that will appear in the article - you might find it useful: rory dot hewitt at ca dot com. Having said all of the above, basic loading into an array and then sorting the array using SORTA will probably perform just as well as the more esoteric methods, unless you're talking about tens of thousands of array elements... HTH, Rory
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.