/* translate in place */ trnslt: procedure(s, trans_to, trans_from); dcl (s, trans_to, trans_from) char(*); dcl (i, j) fixed bin(15); do i = 1 to length(s); j = index(trans_from, substr(s,i,1)); if j ^= 0 then substr(s,i,1) = substr(trans_to,j,1); end; end;