DATA Step, Macro, Functions and more

tranwrd in sysfunc

Reply
N/A
Posts: 0

tranwrd in sysfunc

Hi,
I am trying to use the code below to get the required result. when I use tranwrd in data _null_ I get the right result.

%let m=apple martini;
%let m=%sysfunc(tranwrd(&m," ",", "));
%put &m;

returns: apple martini

require : apple, martini
Respected Advisor
Posts: 3,892

Re: tranwrd in sysfunc

Try this:
%let m=apple martini;
%let m=%sysfunc(tranwrd(&m,%str( ),%str(, ) ));
%put &m;

And here the explanation:
http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0105D&L=sas-l&P=29776

HTH
Patrick
N/A
Posts: 0

Re: tranwrd in sysfunc

Thanks, that was really helpful
Ask a Question
Discussion stats
  • 2 replies
  • 131 views
  • 0 likes
  • 2 in conversation