f



Re: combine n SAS datasets in to one SAS dataset.

If you use the dictionary tables try Proc SQL - it will run much more
quickly than a datastep:

%let lib=YourLib;
%let mem=file2007;

proc sql noprint;
    select MemName into :MemList
         separated by " &lib.."
     from dictionary.tables
         where LibName=upcase("&lib")
           and MemType='DATA'
           and MemName eqt upcase("&mem");
quit;

data &lib.File_History;
     set &lib.&MemList;
run;



hth

Paul Choate
DDS Data Extraction
(916) 654-2160

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
stulkem@YAHOO.COM
Sent: Thursday, January 17, 2008 12:06 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: combine n SAS datasets in to one SAS dataset.

Thanks for your help in advance!

I have hundreds of SAS datasets that I want to combine into one SAS
dataset.

For example,  I want to set     file20070101.sas7bdat -
file20071231.sas7bdat  (365 total files) into
file_history.sas7bdat.

How can I write this into a macro or array or whatever will work so I
don't have to write each individual file name??

Thanks again!

Mark
0
pchoate (2538)
1/17/2008 10:52:29 PM
comp.soft-sys.sas 142827 articles. 4 followers. Post Follow

0 Replies
1130 Views

Similar Articles

[PageSpeed] 6

Reply: