Date: Fri, 20 Mar 1998 12:44:47 +0000
Reply-To: Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Organization: Crawford Software Consultancy Limited
Subject: Re: Appending data from several files to one dataset ??
In article <01bd53eb$86849de0$LocalHost@pc433>, PMG <pmg@post5.tele.dk>
writes
>I've made a macro and program as following:
>
>%macro ReadFile(FileName, special);
> filename alllogs ("&FileName");
> data tmp1;
> input id text;
> special = &special;
> run;
>%mend;
>
>ReadFile("file1.txt", 10);
>ReadFile("file2.txt", 20);
>......... and so on !!
>
>The structure of the input-files are the same, and I want all the data in
>ONE dataset. But each time I call the macro, it deletes the contents,
>instead of appending to the dataset. How can I change that behavior ????
>
>:-) Thomas Kongstad
Thomas,
> Did the FILEVAR option of the InFILE statement not work for this ?
>
> It should achieve what you need in just one data step with no macros !
>
>
--
Peter Crawford
|