|
Thanks for the answer, actually what I’m trying to do is store some files into dynamic arrays, and avoid input/output overhead, the subfield KeyEJr is equivalent to the file’s Key and I want a binary search for better performance. Saludos, Leonel Mejía Chinchilla Administrador de Seguridad de Sistemas Gerencia de Tecnología y Operaciones Regionales BAC | Credomatic Network "Jon Paris" <Jon.Paris@xxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 24/07/2006 04:07 p.m. Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To <rpg400-l@xxxxxxxxxxxx> cc Subject RE: Ascend on Overlay Subfield
It is sorted by ArAdaEJr and I want to do a %LookUp over KeyEJr. Does
the %LookUp perform a binary search? Or Apply the Ascend key over the subfields? %Lookup will do a binary search if the array is in sequence. By placing the Ascend keyword on the array you told it that it was indeed in sequence. Problem is being in sequence on ArAdaEJr doesn't mean that any of the subfields are in sequence. Either SORTA on the subfield you want or remove the Ascend keyword or duplicate the array entry and overlay any subfields you want to lookup against the non-sequenced version. It depends on _why_ you want to use lookup on a subfield - it doesn't appear to make a lot of sense since you can only locate one with that value that way. Jon Paris Partner400 www.Partner400.com
-----Original Message-----
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.