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



I don't want to put words into Hans' mouth, but I think what he meant was
that you would create a logical view over the data, with a key in the
sequence you would want to load the array. Then you could avoid the SORTA
all together.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Lim Hock-Chai
Sent: Tuesday, April 13, 2004 12:01 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: %lookup

I understand that, statistically, sequential search is much slower when
there is a big amount of data to be searched.  However, I'm kind of surprise
to hear you said that a database search could be faster than array search.
Is it because %lookup will not use binary search when passing the start
index?

Reason for not using logical:  The particular data file is our master
"decode" table.  It's divided into two sections, the key and data.  The data
portion is a long text field that can be sub-divided into separate field
from an application.  My application happens to need to search this file by
the data portion.  Although not every often, other programmers could go into
the application to change the position of the field which will cause by
logical to not work correctly.

-----Original Message-----
From: Hans Boldt [mailto:boldt@xxxxxxxxxx]
Second, since the data is already in a file, why not just define a 
logical view of it and use that to search for what you want? That's much 
easier, and probably faster too.


_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.