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 (June 2011, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 2 Jun 2011 09:48:42 -0400
Reply-To:   Tom Smith <need_sas_help@YAHOO.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Tom Smith <need_sas_help@YAHOO.COM>
Subject:   A datastep question

I have a following datastep:

data xx; set yy; if dr in (1 2); if pa='Y'; if tr in ('1' '2' '3' '4' '5' )then delete; if tr in ('11' '12') and xp=2 then delete; lb=1; run;

I tried to short cut it as below, but some where I made the logic wrong, Can anyone please look at it and say where I might have made that mistake:

data xx; set yy; if (dr in (1 2) and pa='Y' and tr not in ('1' '2' '3' '4' '5' )and (tr not in ('11' '12') and xp ne 2)) then lb=1; run;

Thanks you so much


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