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



 >> Yup.  That fixed it.  I guess I understand the purpose of the ASCEND
keyword, or at least when not to use it.  Thanks!

So that others don't get the wrong impression Tony, I would like to point
out that in your example you _should_ have used ASCEND.

As Paul mentioned, you should have used the fourth parameter on %Lookup to
inform the BIF that the array was not fully loaded and therefore to
constrain the number of entries searched.  This would have cured your
problem and given you better performance than removing the Ascend keyword.
%Lookup is far better/faster than the old LOOKUP op-code but with the
constraint that you must mean what you say <grin>.  You coded that the whole
array was in ascending sequence - it wasn't.  It had a bunch of blank
entries at the end that were out of sequence and caused your original
problem.

For anyone who is interested in the "nuts and bolts" of this issue check out
the article "Look before you %lookup" which we wrote for the eXtra
newsletter.  You can find it at
http://www.eservercomputing.com/iseries/articles/index.asp?item=DIRECT&sid=1
0&id=498 or via our web site at http://partner400.com/ArticlesEXTRA1.htm

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.