I have the following simplified version of a piece of code that I am working on:
%macro test(var);
%if &var = 'Sub Prime' %then %do;
%let var2 = 'Sub_Prime';
%put &var2;
%end;
%mend;
%test(Sub%str( )Prime);
Basically the point of this is that if var = 'Sub Prime' that var2 should = 'Sub_Prime'. It appears though that var does not equal 'Sub Prime'. Can anyone tell me what I am doing wrong?
Thanks
Macro variables do not use quotations.
You'd be better off using
%str
around the whole thing, though, rather than inserting the %str in just the space.