× 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've used the %scan() bif for this. For example:

#length = %scan(%trimr(@var):ivdesc);

@var is the variable I (or more properly the users) want to find anywhere in an item's description. In this case it is necessary to read the entire contents of the Item Master table, but over a 5000 record table it is still sub-second response.

You can, also, use embedded SQL in your RPG IV program.

Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Dennis Lovelady
Sent: Tuesday, February 02, 2010 2:54 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: Technique (BIF) to perform a %LIKE% in RPG?

I don't see a BIF to perform a "fuzzy match" like the "LIKE" construct
in SQL.
Do you have a technique for me? Thanks! (or a URL example?)

Search iseriesnetwork.com for regex.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
What is a friend? A single soul dwelling in two bodies.
-- Aristotle


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.