Hello Everyone,
I am trying to use a macro inside PROC IML and it is giving me an error. Suppose I created a macro named mymacro and I call this macro inside proc iml. I would think 4 will be returned 5 times but it is not. Can anyone explain why this is not working?
%macro mymacro(A,Y=2);
proc iml;
Z=&A+&Y;
print Z;
quit;
%mend mymacro;
proc iml;
do i = 1 to 5;
%mymacro(2);
end;
quit;