LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2011, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 9 Sep 2011 11:03:04 -0400
Reply-To:     bbser 2009 <bbser2009@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         bbser 2009 <bbser2009@GMAIL.COM>
Subject:      Re: A Data Manupulation _need help quick thanks
In-Reply-To:  <74C68B9A11674F74A2A4E08844B1AD04@D1871RB1>
Content-Type: text/plain; charset="us-ascii"

Alternatively, we may use proc sql like below.

Regards, Max (Maaxx)

Data Tom; input subject set; cards; 1001 1 1001 2 1007 1 1009 1 1009 2 1010 1 ;

proc sql; select * from tom group by subject having sum(set=2)=0; quit;

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Nat Wooding Sent: September-09-11 10:44 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: [SAS-L] A Data Manupulation _need help quick thanks

Data Tom; input subject set; cards; 1001 1 1001 2 1007 1 1009 1 1009 2 1010 1 ; * this assumes that the set is sorted by subject and set; Data TomWants; Set Tom; by subject ; if last.subject and set = 1; run; * this will select only one value for each subject; -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Tom Smith Sent: Friday, September 09, 2011 10:36 AM To: SAS-L@LISTSERV.UGA.EDU Subject: A Data Manupulation _need help quick thanks

I have a following dataset

subject set ------- --- 1001 1 1001 2 1007 1 1009 1 1009 2 1010 1

I neet only those subject who has value 1 for the set varialbes. and the output dataset ( need a dataset not report) should be as below:

subject set ------- --- 1007 1 1010 1

I know this might be simple, but for some reason my head is not working and I need yoru help badly.


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