楼主: 若水烟寒
2946 10

请问在宏之中可以定义array嘛? [推广有奖]

11
若水烟寒 发表于 2012-11-11 16:01:57
bobguy 发表于 2012-11-11 10:09
Here is a general example for rename variable in a data set.
Thank you very much! I found another example:
data a;
a=1;
b=2;
c=3;
run;
proc contents data=a out=b ;run;
data b1;
set b;
renames=compress(name||'=p'||_n_);
keep renames;
run;
proc sql noprint;
        select renames into:renames separated by ' '
                from b1;
quit;
%put &renames=;
data c;
set a(rename=(&renames.));

The sql procedure is quite useful. But I don't quite understand why there is a "." behind "rename" in the last sentence. What does it mean? Thank you ^^~

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-1 17:28