I have this simple data step to assign a value to a macro variable:
data _null_;
call symput("para1", 'hello');
putlog "para1 is ¶1";
run;
As you expect, when I run this code, in the log window, 'para1 is hello' is displayed.
The weird thing is, if you change the value 'hello' to, for example, 'world' and run the code again, what you get is still 'para1 is hello', not 'para1 is world' as expected. But if you run the codes for the second time, then 'para1 is world' is displayed in the log window, which is what is expected.
This is very confusing to me, seems the SAS :remembers" or "caches" the last value, what is the problem with it?
Anyone can give me a piece of light on this problem? thanks.
Eric
Message was edited by: EricSK
Message was edited by: EricSK