Hello Norman.
From there its actually dependent on the way you are importing the data.
I suppose those are standard excel files, and that you have proc import licensed and that you are using it to import the desired files.
If so, you'll need to issue a proc import for each file.
I think a possible way to code this, would be to load the file list into a list of macro variables...
[pre]
%let FILELISTN=0; * init file list count;
data _null_;
infile 'C:\My SAS Files\filelist.txt';
input EXTERNALNAMES $ 80.;
* create macro variable FILELISTX with the corresponding filename;
call symput(cats('FILELIST',put(_N_,best.))),catx(' ',symget('FILELIST'),EXTERNALNAMES);
* save count of FILELISTX created;
call symput('FILELISTN', put(_N_,best.));
run;
[/pre]
After that you'll get,[pre]
FILELIST1=n:\data\data01\excelfile.xls
FILELIST2=n:\data\data02\excelfile.xls
...
FILELISTN=N
[/pre]
being N the total count of files to be imported.
Then you just need to issue a proc import for each FILELISTX using a macro loop...
[pre]
%macro load_data;
* erase data of previous run, if any;
proc datasets lib=WORK nolist;
delete INDATA:;
quit;
* loop to total count of files;
%do I=1 %to &FILELISTN;
* import file;
proc import out=WORK.INDATA&I
file="&&FILELIST&I"
dbms=xls replace;
getnames=yes;
run;
* append data;
proc append base=INDATA data=INDATA&I force;
run;
%end;
%mem load_data;
%load_data; * run macro;
[/pre]
Finally you should get a WORK.INDATA dataset with the concatenated data imported from the specified excel files.
Code above not tested!
Cheers from Portugal.
Daniel Santos @
www.cgd.pt