Apart from prior chrtran() and strtran() offerings... you might avoid the duplicate substr():
lcString="ABC,DEF,GHI,JKL"
lcString2=""
x=0
do while x<len(m.lcString)
x=m.x+1
lcString3=SUBSTR(m.lcString,m.x,1)
IF m.lcString3<>","
lcString2=m.lcString2+m.lcString3
ENDIF
enddo X
?m.lcString2
For enjoyers of left field:
lcString="ABC,DEF,GHI,JKL"
lcString2=""
licount=getwordcount(m.lcString,",")
for x=1 to m.liCount
lcString2=m.lcString2+getwordnum(m.lcString,m.x,",")
endfor
?m.lcString2
And then there's always strextract()...
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us."
-- Shakespeare: Coriolanus, Act 1, scene 1