mathematical statistician
=========================================================================
Date: Fri, 21 Feb 2003 21:21:15 +0000
Reply-To: Alastair Nicol <calaban.madness@BLUEYONDER.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Alastair Nicol <calaban.madness@BLUEYONDER.CO.UK>
Subject: Re: Do the same function to multiple data files
In-Reply-To: <3E56899F.8060807@nceas.ucsb.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
you could try the filevar= option on the infile statement,
or call execute to call a macro.
Tip with call execute and macros, wrap your macro call in a %nrstr to
force the macro to be evaluated at the end of the dataset, rather than
in the datastep.
data _null_;
set sashelp.vtable;
call execute('%nrstr(%mymac('||libname'||));');
run;
Al
Christy M Bowles wrote:
> Hi all,
> I have 100 text files (datasest1 - dataset100) in the same format. I
> need import the files and perform identical (simple) functions on the
> files (correct spelling, account for inconsistencies in naming, etc.)
> before I can merge the files. There must be an efficient way to do this
> (other than 100 import and data statements). I'd appreciate any
> suggestions- thanks in advance.
>
> Cheers,
> Christy
>
> --
|