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



On Mon, Jun 1, 2020 at 1:11 PM George Smith <gsmith@xxxxxxxx> wrote:

I finally removed the Where clause from my Declare statement and the program compiled. I started putting back the pieces until it quit compiling.

That's an excellent process to find out what the problem is.

I figured out I was nesting several Replace statements too deep (26). I can't remember what the depth is but I obviously exceeded it.

Glad you found it! And thank you for reporting it here. It may help
someone in the future.

I was attempting to replace any special characters from both my search argument and the field being searched . Oh well I will just trim it back to a main set of special characters and go forward.

I apologize if this was already discussed with you before, but given
this use case (which is pretty darn common; it feels like it comes up
several times a year in these lists), have you thought about making a
UDF (or possibly SP, but it seems like UDF fits better here)
implemented in RPG? Or, depending on the structure of your existing
program, maybe just rework it so that you have string-manipulation
logic handled by RPG within the program?

Or, if you're just replacing all the special characters with the
*same* character (like question mark or blank) or removing them
altogether, then you could also just use REGEXP_REPLACE instead of
many separate REPLACE calls.

John Y.

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.