%macro sql_replace (table_name,col_name,old_String,new_String);
proc sql;
update &table_name
set &col_name = &new_String
where &col_name = &old_String ;
quit;
%mend sql_replace;
data a1;
input x1$ x2$ @@;
cards;
aaa
www
bbb www
ccc www
;
%sql_replace(a1,x1,"aaa","bbb");