I have a SAS macro variable that is:
&varlist. = OriginCd,DestinCd
I'm trying to get a new macro variable that is the same thing, but with the commas removed and a space. So this:
&newlist. = OriginCd DestinCd
I've tried the following:
%let newlist=%sysfunc(tranwrd(%sysfunc(compbl(&varlist)),%str(,),%str( )));
%let newlist = %sysfunc(compress(&varlist,','));
%let newlist = %sysfunc(tranwrd(&varlist,","," "));
For the tranward function, I get "the function TRANWRD referenced by %SYSFUNC macro function has too many arguments". But I'm pretty sure this is how you normally use it. Thanks!