/* define it */ options mprint; %macro noexit(myname); data _null_; m = symget("&myname"); n = translate(trim(m),'____________________','%&"()'';,'); call symput("&myname",n); run; %mend noexit; /* test it */ %let p=%nrstr(nasty;stuff&%pc); %noexit(p); data _null_; t="&p"; put t=; run;