Hi, I'm not quite able to understand your example. If you have a step in your macro like: data _null_;
a=compress("M&S"||"%");
call symput("Table_Brand",a);
run;
%put &Table_Brand;
That will throw the warning because M&S looks to SAS like M followed by a reference to a macro variable &S. The & is a macro trigger, telling SAS that a macro variable name is coming. Macro quoting lets you hide the & from SAS, so it doesn't see a macro trigger. You could use macro quoting in this case, like: data _null_;
a=compress("%nrstr(M&S)"||"%");
call symput("Table_Brand",a);
run;
%put &Table_Brand;
But it would be unusual to use CALL SYMPUT like that, because you are not reading a data step variable. So you could achieve the same thing with just a %LET statement, e.g.. : 52 %let Table_Brand=%nrstr(M&A%%);
53 %put &Table_Brand;
M&A%
Hope that helps, --Q.
... View more