The SAS is on my computer and so are the files. If all the files are in the same directory I can import them with a macro.
Also, first I used a macro to extract all the file paths and names into a table, and from that table I want to get the paths into a another macro that will import those files. The file paths and names extraction macro is actually a solution to one of my other questions, here I put it in case it i sof interest:
%macro list_files(dir,ext);
%local filrf rc did memcnt name i;
%let rc=%sysfunc(filename(filrf,&dir));
%let did=%sysfunc(dopen(&filrf));
%if &did eq 0 %then %do;
%put Directory &dir cannot be open or does not exist;
%return;
%end;
%do i = 1 %to %sysfunc(dnum(&did));
%let name=%qsysfunc(dread(&did,&i));
%if %qupcase(%qscan(&name,-1,.)) = %upcase(&ext) %then %do;
%put &dir\&name;
%let file_name = %qscan(&name,1,.);
%put &file_name;
data _tmp;
length dir $512 name $100 ;
dir=symget("dir");
name=symget("name");
path = catx('\',dir,name);
the_name = substr(name,1,find(name,'.')-1);
run;
proc append base=list data=_tmp force;
run;quit;
%end;
%else %if %qscan(&name,2,.) = %then %do;
%list_files(&dir\&name,&ext)
%end;
%end;
%let rc=%sysfunc(dclose(&did));
%let rc=%sysfunc(filename(filrf));
%mend list_files;
%list_files(C:\Documents and Settings\HP_Administrator\Desktop\files,xls)
"files" is the folder that contains the other folders that contain the xls files
... View more