Date: Mon, 15 Oct 2001 11:55:08 -0700
Reply-To: "Karsten M. Self" <kmself@IX.NETCOM.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Karsten M. Self" <kmself@IX.NETCOM.COM>
Subject: Re: Joining external datasets to make one SAS dataset
In-Reply-To: <20011014234153.B1408@navel.introspect>; from
kmself@IX.NETCOM.COM on Sun, Oct 14, 2001 at 11:41:54PM -0700
Content-Type: multipart/signed; micalg=pgp-sha1;
on Sun, Oct 14, 2001 at 11:41:54PM -0700, Karsten M. Self (kmself@IX.NETCOM.COM) wrote:
> on Mon, Oct 15, 2001 at 04:28:57PM +1000, Andrew Dixon (adixon@DOH.HEALTH.NSW.GOV.AU) wrote:
> > Hi all,
> > Is there some neat way of joining a heap of small text files, all with
> > the same variables in the same positions, to make one sas dataset?
> RTFM PROC APPEND
> data unim;
> set pluribus1 pluribus2 pluribus3 ... ;
I thought I'd posted a fix to this, it doesn't seem to have posted.
I clearly misread the post (or rather, read the subject, and not the
content). The issue is reading flatfiles, not SAS datasets.
Options: FILENAME PIPE, concatenated filename, or FILEVAR.
Filename pipe is my first choice in general. Under GNU/Linux:
filename pluribus pipe "cat file*.txt";
input /* stuff */;
/* stuff */
Concatenated filename, RTFM, syntax varies by platform. Examples should
be provided in docs.
FILEVAR: a variable in the data step is used to change the infile
pointer. This can be fed from a list, iterated, or read from another
source. Again, see documentation for details and examples.
Karsten M. Self <email@example.com> http://kmself.home.netcom.com/
What part of "Gestalt" don't you understand? Home of the brave
http://gestalt-system.sourceforge.net/ Land of the free
Free Dmitry! Boycott Adobe! Repeal the DMCA! http://www.freesklyarov.org
Geek for Hire http://kmself.home.netcom.com/resume.html