Hi, I want to create some macro variable with the help of another macro variable. Please suggest how i can resolve below code? I am in some sort of programming where i can just edit this macro only. So kindly dont suggest to create another macro. I can only edit this one. %macro rowToMacroVariable(dataSetName,variableName,macroVariableName);
data _null_;
set &dataSetName;
call symputx("¯oVariableName"||strip(put(_n_,best.)),&variableName,"G");
run;
%mend;
data ab;
input brand$ impress$;
cards;
b TJ
c DJ
d PJ
;
run;
%rowToMacroVariable(ab,brand,brand);
%rowToMacroVariable(ab,impress,var_&brand);
%put _GLOBAL_;
Now with the help of above code i want to create brand1=b brand2=c brand3=d which is working perfectly fine. But in next row when i am trying to create var_b=TJ var_c=DJ var_d=PJ it throws an error. I am not sure why this is hapenning?
... View more