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



Hey All

I'm going to be doing some mass-scans of RPGLE source, and I'm trying to figure
out if there's a better way than using the SQL LIKE keyword.

I was thinking I'd to do Dynamic SQL that looks something like this:


SELECT COUNT(*) FROM SRCMBR
  WHERE SRCDTA LIKE '%<field name>%' AND
    SUBSTR(srcdta,7,1) <> '*' 

This select does two character comparasons, which can't be cheap, and the LIKE
has to do a pattern match which is likewise expensive.  However, I don't know
enough about SQL to do anything that would be less intensive.

This is part of a set of programs that will enable me to keep track of various
versions of our product at certain customer sites.  For that reason, I want
this solution to be as automated as possible (otherwise, I'd wumpus up some
quick and dirty programs driven through a PDM option).

Any ideas?

Thanks

-Doc


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.