If I have a variable (var) such that if category= A then the value of var is 1, if category=B then value of var is 2, and if category =C then the value of var is 3 and I want to create indicator variables for these three categories of var, called var_1, var_2, and var_3 using macros, would it be correct to say
%macros Create_indictor (num=);
data= mydata;
if var= &num then %put var_#
run;
%mend Create_indicator;
%Create_indicator (num=1);
%Create_indicator (num=2);
%Create_indicator (num=3);