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



Hi Hans,

How about something like this ....

if A = B;
// match found
else;

zpos = %scan('*': A);
if zpos > 1;
zlen = zpos - 1;

if %substr(A: zlen) = %substr(B: zlen);
// match found
else;
// no match found
endif;

else;
// no match found
endif; // zpos > 1

endif; // A = B


The expanded list would not be a good idea - you will never be sure you have expanded fully enough.

Regards,
John Mckay mba
ww.mckaysoftware.ie
www.rpglanguage.com

On 19/05/2011 04:17, Evan Harris wrote:
Hi Guys

I have a project where I want to process a list of entries obtained
from a detail table against a control table to determine whether
certain processing should take place. Some kind of processing will
take place on all entries - the control file will determine which
entries will be treated differently.

For example, if processing a list of users e.g. BOB, CHARLIE, DAVID,
JACK, JOHN, MICHAEL and RICHARD
and a control file like BOB, DAVE, J*...

How would I match the JACK and JOHN detail entries to the J* entry in
the control table to retrieve processing control data ?

I've thought of a couple of possibilities but they seem to be ugly.
One was to first build an expanded the list by using the generic
entries to query the control table and then matching detail entries
against the expanded list.

Any other ideas out there ?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.