Hello: I am trying to read in several SAS datasets for US states, each with a filename that has the format <statename>births i.e. ARnew, AZnew, CAnew, I have 45 such datasets that I want to combine. I am using a do-loop for this but get an error saying "work.set.data. does not exist". What am I doing wrong? libname proj '... '; %let statelist=%str(ak,ar,al,.....wi,wv); %macro combine; data test; %do k=1 %to 45; %let state=%sysfunc(strip(%sysfunc(scan(&statelist,&k,',')))); set proj.&state.new %end; ; run; %mend; %combine; Thanks Dana
... View more