If you can use embedded SQL in your RPG program, it becomes much easier than the built it RPG methods I've seen:
exec sql
set :originalvar = replace(:originalvar,' with ','itke');
That should replace all occurrences of ' with ' with 'itke'.
It's a similar idea to the answer given <a href="http://itknowledgeexchange.techtarget.com/itanswers/using-as400-sql-to-replace-a-variable-string/">here</a>, but substituting host variables for fields.
There is a limit on when the SQL set command became available, and I don't see a mention of what release you are on...so...YMMV. :)
Last Wiki Answer Submitted: April 15, 2011 8:57 pm by Koohiisan5,005 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
What is the string contained in — a program variable? …a column in a table?
What language do you want to use?
Tom
If using RPG, you can use the BIF
Is that a 7.0 BIF, Graybeard52? Or did they sneak one (that I have been wanting) passed me?
@Bigkat
Yep, looks like a 7.1 thing.
Here