SAS Macro for multiple datasets -
i new sas. have 12(monthly data) data sets in folder. names of data sets are:
201401 201402 201403 ... 201411 201412
each data contain 10 variables. variable names same data. want 3 variables among 10 , rename data new_201401
, on.
i trying manually using keep var1 var2 var3;
there easy way or macro can make fast? in advance.
i think trick:
%macro keep(table,var1,var2,var3,set); data &table (keep=&var1 &var2 &var3); set &set; run; %mend keep;
Comments
Post a Comment