| Date: | Thu, 5 Oct 2006 14:27:25 -0700 |
| Reply-To: | David L Cassell <davidlcassell@MSN.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | David L Cassell <davidlcassell@MSN.COM> |
| Subject: | Re: Creating Multiple datasets |
| In-Reply-To: | <200610051541.k95EuBY6000838@mailgw.cc.uga.edu> |
| Content-Type: | text/plain; format=flowed |
|---|
nash2sasl@YAHOO.COM wrote:
>
>I have a need for creating 50 datasets from a larger base dataset.The
>codes will look like this for a single run - need to iterate this 50 times:
>
>data temp1;
> set basedata;
> by ID;
>if mkt=1; **I have 50 markets;
>run;
>
>data temp2;
> merge temp1(in=a)
> ext_dataset; /**External dataset**/
> by ID;
> if a;
>run;
>
>
>Any suggestions?
>
>TIA,
>Nash
I'm going to side with Bob on this. Don't do it.
There are reasons for splitting data up into lots of little data sets.
But most of the things people tell me are not *reasons*.
If you need this for subsetting the data so that you can
analyze the pieces, then you probably do not want to split
the data up at all. Use by-processing, or use WHERE clauses
to pull out the pieces that you want. Add an index on your
MARKET variable, and that may speed up your WHERE processing.
If you need this for display purposes, and you are creating
a separate table for every market, then use by-processing
to split the data on the MARKET variable. You can also use
ODS to split the tables into separate webpages.
If you need this for output purposes, then you may still be making
a mistake. It depends on the data and the business case and the
destination.
HTH,
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330
_________________________________________________________________
Get today's hot entertainment gossip http://movies.msn.com/movies/hotgossip
|