Hi Everybody, Please help me to explain why in below the "%put &=u" is executed only once during the do-loop when i=5, while "put i=" is executed every iteration of the loop. The evidence is in the log below the code under line 76 and under line 79. Many thanks for the help. data loop;
do i=1 to 5;
call symput("u",put(i, 1.));
%put &=u;
put i=;
end;
run; 1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
SYMBOLGEN: Macro variable _SASWSTEMP_ resolves to /folders/myfolders/.sasstudio/.images/68d8567e-556b-4297-83b9-f0b6abc1b09d
SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.
SYMBOLGEN: Macro variable GRAPHINIT resolves to
72
73 data loop;
74 do i=1 to 5;
75 call symput("u",put(i, 1.));
76 %put &=u;
SYMBOLGEN: Macro variable U resolves to 5
U= 5
77 put i=;
78 end;
79 run;
i=1
i=2
i=3
i=4
i=5
NOTE: The data set WORK.LOOP has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
... View more