Date: Mon, 22 Oct 2001 09:37:58 -0400
Reply-To: "Fehd, Ronald J." <rjf2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J." <rjf2@CDC.GOV>
Subject: Re: Appending all the datasets in one library to all the datasets
> From: Kendall Golladay [mailto:kgollada@UI.URBAN.ORG]
> I was wondering if anyone knew of a quick way to append all
> the datasets in
> one library to all those in another library (to the datasets in this
> library with the same names). I am trying to develop a
> program that will
> process monthly data updates and then add the updates to
> existing files.
> If there are any other suggestions for performing an
> operation like this, please let me know.
ah, yes, list processing, one of my favorite passtimes:
writing SAS programs that write my SAS programs for me.
the basic module you want to replicate is:
proc APPEND base = LIBOLD.DATA1
data = LIBNEW.DATA1;
you can get a list of MemNames from DICTIONARY.TABLES
while you're at it, add the module phrases
and save the list into a macro variable:
select 'proc APPEND base = LIBOLD.'
!! 'data = LIBNEW.'
separated by ' '
where MemType = 'DATA'
and Libname = 'LIBOLD'
Your APPEND module will be in the macro variable LIST
which you can view with the %put statement:
when you have LIST written with correct syntax,
Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov
OpSys: Win_Pro Ver: 8.2
---> cheerful provider of semi-TESTED SAS code from the KludgeWrx !*! <---
If you always try to be logical,
you probably won't ever have much sorrow,
or much fun.
-- Ashleigh Brilliant pot-shot #4438