LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2001, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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 > > or > > data unim; > set pluribus1 pluribus2 pluribus3 ... ; > run;

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";

data unim; infile pluribus; input /* stuff */; /* stuff */ run;

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 <> What part of "Gestalt" don't you understand? Home of the brave Land of the free Free Dmitry! Boycott Adobe! Repeal the DMCA! Geek for Hire


Back to: Top of message | Previous page | Main SAS-L page