%let cutoff = '01JAN2005'd;
%macro importer4(List_of_states);
%let counter = 1;
%let state = %scan(&List_of_states, 1);
%do %while("&state" NE "");
filename hello url "http://research.stlouisfed.org/fred2/data/&state.UR.txt";
data &state;
infile hello firstobs = 13;
input date yymmdd10. UR;
State = "&state";
run;
%let counter = %eval(&counter + 1);
%let state=%scan(&List_of_states, &counter);
%end;
data combined;
set &List_of_states;
format date mmddyy10.;
if date ge &cutoff;
run;
%mend;
%importer4(KY TN IN GA SC AL WV);
%macro importer5(List_of_state);
%let counter = 1;
%let state = %scan(&List_of_state, 1);
%do %while("&state" NE "");
filename xx url "http://research.stlouisfed.org/fred2/data/&state.BP1FHSA.txt";
data &state;
infile xx firstobs = 26;
input date yymmdd10. Start;
State = "&state";
run;
%let counter = %eval(&counter + 1);
%let state=%scan(&List_of_state, &counter);
%end;
data combined2;
set &List_of_state;
format date mmddyy10.;
if date ge &cutoff;
run;
%mend;
%importer5(KY TN IN GA SC AL WV);
data final;
merge combined combined2;
run;
proc print;
run;
解决啦~~~~·