Reputation: 955
I have an issue with combining proc iml
, if/then
and call symputx
. If I run the following code :
proc iml;
call symputx("noif",3);
a=1;
b=&noif; /* 1) : works*/
if a=1 then call symputx("withif",1);
if a=1 then print a; /* 2) : works */
c=&withif; /* 3) : doesn't work */
quit;
%put &withif; /* 4) : works */
1) working (and SAS/IML documentation) show I can use call symputx
in proc IML
2) working (and SAS/IML documentation) show I can use if/then
in proc IML
3) not working must therefore be due to some issue in combining the three statements.
But 4) working shows the call symputx("withif",1)
was somehow understood.
What is the proper way to conditionally define a macro-variable inside proc iml
?
Upvotes: 2
Views: 817