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 (May 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 5 May 2004 15:55:11 -0400
Reply-To:     Steve Raimi <steven.raimi@GM.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Steve Raimi <steven.raimi@GM.COM>
Subject:      Re: Help in deleting some records from the data
Comments: To: prasad_prabhud@HOTMAIL.COM

This will do the job (it's tested code):

data dowork; retain currid todelete 0; set your_dataset; if currid = id and todelete = 1 then do; if status ne 'REH' then delete; else todelete = 0; end; if id ne currid then do; currid = id; todelete = 0; end; else if status = 'TER' then todelete = 1; run;

HTH,

Steve Raimi


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