I have written a simple macro and applied it in a simple SAS data step to illustrate an issue I am having with viewing output.
Macro:
%macro test_func(var=);
%put &var;
%mend;
Data step:
data test_data_step;
value = 0;
%test_func(var = value);
run;
My issue is that the output I see is just the string value rather than the value held in the variable whose name is equal to that string.
I believe I have a vague understanding as to why SAS is doing this, but I don't know how to get it to give the desired value (namely 0 in this case). So how would I be able to achieve that functionality?
Thanks!