Date: Sat, 27 Jun 1998 18:23:37 GMT
Reply-To: Ron Stanonik <stanonik@NPRDC.NAVY.MIL>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Ron Stanonik <stanonik@NPRDC.NAVY.MIL>
Organization: Navy Personnel R&D Center
Subject: subsetting large raw file?
Sorry if this is novice question. I've searched the
various FAQ's.
We're trying to create a subset of a large raw file (1.5GB).
The large file, history, is sorted by an ID number.
If we wanted a subset of only a few ID numbers, we'd do
something like
data subset;
infile history;
input id ...;
if id=3 or id=10 or id=23;
But we want a subset of a large number of ID numbers, which we've
got in a file, action. The following works for a small test history
file, but fails for the large file because creating the data set history
fills /tmp. We're running SAS 6.12 on Solaris.
data action;
infile action;
input id;
data history;
infile history;
input id ...;
data subset;
merge action (in=in_a) history (in=in_h);
by id;
if in_a & in_h;
Yes, we could make /tmp larger or use the WORK option to
specify a filesystem with more free space, but surely there
is some way to create the subset as the large file is read.
No?
Thanks,
Ron Stanonik
stanonik@nprdc.navy.mil
--
Ron Stanonik
stanonik@nprdc.navy.mil