Hi,
I am trying to figure out why a macro variable is not resolving correctly when I use call symput.
Here is how I define the macro variable:
data cross2;
set cross crossb2;
if &domain. = 1 and missing(&by.) and F_&by. = "Total" and F_&var. = "Total" then do;
&by.=99;
scale=WgtFreq/Frequency;
call symput("scale",scale);
end;
run;
Here is how I want to use the macro variable:
data cross3(keep=&by. VarLabel NMISS Scale Mean stderr min max);
set cross2;
if &domain. = 1 then output;
scale=&scale.;
WgtNMISS = &scale.*NMISS;
run;
%put &=scale;
When I run the above code, I am getting a missing value for scale in a data set print out, but the log print out of the variable shows it resolved to a number.
Any idea why the number isn't printing in the data set?