Date: Sat, 20 Dec 2008 11:01:32 -0500
Reply-To: Ryan Utz <rutz@AL.UMCES.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ryan Utz <rutz@AL.UMCES.EDU>
Subject: Batch-exporting data from a huge dataset
Hi all,
I have a HUGE (~600,000 lines of data) dataset that I need to parse out and
export to individual .csv files. The data look like this:
data one;
input site $ date $ time $ ampm $ temp;
cards;
A 6/1/2001 12:20:00 AM 9.71
A 6/1/2001 12:40:00 AM 9.87
A 6/1/2001 1:00:00 AM 9.87
A 6/1/2001 1:20:00 AM 9.87
A 6/1/2001 1:40:00 AM 9.87
A 6/1/2001 2:00:00 AM 9.87
A 6/1/2001 2:20:00 AM 9.87
B 6/1/2001 2:40:00 AM 9.87
B 6/1/2001 3:00:00 AM 9.71
B 6/1/2001 3:20:00 AM 9.71
B 6/1/2001 3:40:00 AM 9.87
B 6/1/2001 4:00:00 AM 9.87
B 6/1/2001 4:20:00 AM 9.87
;
There are ~100 different sites. What I need to do is make a (preferably
.csv) file for each site that contains the date, time and temperature fields
(the site and am/pm are not necessarily desired). A real bonus would be to
have to .csv files named as the site name.
I figured that SAS might be a good way to accomplish this, but I've never
done anything like this in SAS, so I don't even know what procedures to look
for. Anyone have any good advice?
Thanks,
Ryan
|