Date: Thu, 25 Jun 2009 06:53:24 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: Split Dataset
In-Reply-To: <ad1629b9-b23b-4304-8b92-bb80717c6063@l2g2000vba.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
You are entirely unclear on how to split the dataset... but the general
method is
data want1 want2;
set have;
if (condition) then output want1;
[else] if (condition) then output want2;
run;
I don't know what condition you are needing so you'll need to figure that
out for yourself and/or be more clear.
-Joe
On Thu, Jun 25, 2009 at 2:22 AM, ash007 <RamsamyAshley@gmail.com> wrote:
> Hello SasUsers,
>
> I have a dataset which have a variable named X, this numeric variable
> has either '1', '0' or '.'.
>
> I want to split this dataset in order to have several dataset between
> 1 and 0.
>
> X
> .
> .
> .
> 1
> .
> .
> 0
> 1
> .
> .
> .
> .
> 0
> .
> .
>
> I want to have in this case 2 datasets :
>
> dst_1
> X
> 1
> .
> .
> 0
>
>
> dst_2
> X
> 1
> .
> .
> .
> .
> 0
>
> Thanks.
>
> Ash007.
>
|