LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: ash007 <RamsamyAshley@gmail.com>
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. >


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