Date: Wed, 23 Jul 2008 18:04:08 -0400
Reply-To: Chang Chung <chang_y_chung@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Chang Chung <chang_y_chung@HOTMAIL.COM>
Subject: Re: reading 100K dbf files
On Wed, 23 Jul 2008 08:57:10 -0400, Presley, Rodney (CDC/CCHP/NCBDDD)
>I would like to read in all of the DBF files with the same leading two
>characters into one SAS data file.
i would forgo sas altogether but use cheap data conversion utilities such as
stat/transfer (I have nothing to do with it, except i am one of the users).
it has a command line processor which accepts a command like:
combine *.dbf something.sas7bdat
which is simple but powerful, combining many .dbf files into one sas file.
you have so many data files, so every second counts and this will give you
the fastest speed and the unmatched convenience. any sas solution is bound
to be slower since it involves three steps: writing(or automatically
generating proc or data steps or both) -> compiling -> and then executing.
stat/transfer solution skips the first two steps, which can be more
substantial (time-wise) in sas especially if it involves macros at all.
whoever suggests generating one proc import step per file written out to a
text file (one text file per input file) to be later %include'd into sas for
execution is practically insane, IMHO. :-)