我有一百个变量..想要在每个变量名前都加一个词..比如"Open_XXXX"....请问有快速方法可以搞定吗??
谢谢各位了!!
楼主: vieri32
|
5638
5
[原创博文] SAS修改变量名一问 |
硕士生 22%
-
|
回帖推荐网上找来的
options macrogen mprint mlogic;
%macro rename(lib,dsn);
options pageno=1 nodate;
proc contents data=&lib..&dsn;
title "Before Renaming All Variables";
run;
proc sql noprint;
select nvar into :num_vars
from dictionary.tables
where libname="&LIB" and
memname="&DSN";
select distinct(name) into :var1-
:var%TRIM(%LEFT(&num_vars))
from dictionary.columns
where l ...
本帖被以下文库推荐
| ||
| ||
| ||
| ||
京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明 免责及隐私声明