Data defines the model by dint of genetic programming, producing the best decile table.


SAS Code for Changing Prefix of Variable Names
Bruce Ratner, PhD
Live chat by Boldchat
Live chat by Boldchat

 prefix_change

data IN;
input Routing2001Q1-Routing2001Q4;
cards;
123 234 345 345
;
run;

proc print;
run;

proc contents data= IN
out = vars (keep = name type)
noprint;
run;

proc sql noprint;
select name into : varlist separated by ' '
from vars;
quit;

%put _global_ ;

proc sql noprint;
select trim(name)||'=UNITS_'||substr(trim(name),8)
into :varlist separated by ' '
from dictionary.columns
where libname eq "WORK" and memname eq "IN";
quit;

%put &varlist;

%let varlist=
Routing2001Q1=Units_2001Q1 Routing2001Q2=Units_2001Q2 Routing2001Q3=Units_2001Q3
Routing2001Q4=Units_2001Q4;

proc datasets library=work nolist;
modify IN;
rename &varlist;
quit;

proc print data=in;
run
;

For more information about this article, call Bruce Ratner at 516.791.3544 or 1 800 DM STAT-1; or e-mail at br@dmstat1.com.
Sign-up for a free GenIQ webcast: Click here.