ChangeStr is supported by Classic REXX. You just need not-to-old DLLs. (The same applies to the functions in REXXUTIL.DLL.)
Here's my proc for E, the macro language for EPM:
; Like ChangeStr in REXX.
defproc ChangeStr( Search, SourceString, Replace)
OutString = SourceString
pStart = 1
do forever
pSearch = pos( Search, OutString, pStart)
if pSearch > 0 then
OutString = delstr( OutString, pSearch, length( Search))
OutString = insertstr( Replace, OutString, pSearch - 1)
pStart = pSearch + length( Replace)
else
leave
endif
enddo
return OutString
In REXX, this similar one should work:
ChangeStr2:
parse arg Search, SourceString, Replace
OutString = SourceString
pStart = 1
do forever
pSearch = pos( Search, OutString, pStart)
if pSearch > 0 then
do
OutString = delstr( OutString, pSearch, length( Search))
OutString = insert( Replace, OutString, pSearch - 1)
pStart = pSearch + length( Replace)
end
else
leave
end
return OutString