Date: Fri, 18 Apr 2008 13:00:53 -0500
Reply-To: "data _null_," <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_," <datanull@GMAIL.COM>
Subject: Re: Appending multiple files w/o knowing filenames
In-Reply-To: <200804181747.m3IAkf9K029910@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
Something like this should be helpful. You said "exactly the same" so
you can use open=defer and speed things up.
libname here './here';
data here.a here.b here.c here.d here.e here.f here.g;
set sashelp.class;
run;
%let memlist=;
proc sql;
select cats(libname,'.',memname) into :memlist separated by ' '
from dictionary.members
where libname eq 'HERE'
;
quit;
run;
%put NOTE: memlist=&memlist;
data all;
set &memlist open=defer;
run;
proc contents data=all;
run;
On Fri, Apr 18, 2008 at 12:47 PM, P. Cristian Gugiu <crisgugiu@yahoo.com> wrote:
> Hi all. I have a directory in which I have about a dozen SAS datasets. Each
> dataset has the exact same variables. I was wondering if there was a quick
> way to appending all the files into a single dataset that did not require
> typing the name of each file. I'm sure the solution is not worth the effort
> for just a dozen file, but if I had a 100 files, it certainly would be worth
> it. Anyone know how to do this?
>
> Thanks,
> Cristian
>
|