REPLACE to Replace Characters in a String
July 27, 2011 Skip Marchesani
In V5R3, IBM simplified the manipulation of character strings with the implementation of the INSERT and REPLACE functions in SQL. INSERT allows the positional insertion of one or more characters in a string and REPLACE scans for all occurrences of a target string and overlays or replaces the target string with a replace string. INSERT was discussed in my previous article, and now I will discuss REPLACE. Prior to the implementation of REPLACE in V5R3, scanning for the existence of a target string and replacing it with another string was not very easy. A positional replacement could be performed |