The original discussion was on SAS-L. The OP wanted to replace blanks with ',' in his macro variable strings. eg. Have: %let a=a b c d; Want a=a,b,c,d. So I came up with the following Macro: %macro com (a=); %let a1=; %do i=1 %to %sysfunc(countw(&a)); %let a1=%sysfunc(catx(%str(,),&a1,%scan(&a,&i))); %end; %let a=&a1; %put &a; %mend; %com (a=a b c d) It works for the purpose, but it generate an error message as: ERROR: %SYSEVALF function has no expression to evaluate. Please help me to figure it out why. Thanks in advance, Haikuo
... View more