data _null;
do i=1 to 3;
call execute('%chgc('||i||')');
t=2*symget('cc')+1;
output;
end;
run;
在执行了call execute之后,cc的改变了,但是为什么后面那句
symget('cc')得到的cc的值还是原来的值.
如果要使用新的cc的值该怎么处理,谢谢!作者: shiyiming 时间: 2006-5-27 02:47 标题: RE: the statement in %chgc() executes after the end of the data step's execution. Another word, it executes after Do...End statement in your case. If you do not use %chgc, it can be resolved by using call symput() as below.
[code:f06ef]
data _null;
do i=1 to 3;
call symput('cc', i );
t=2*symget('cc')+1;
put t=;
end;
run;
[/code:f06ef]