Date: Tue, 21 Jun 2011 12:23:57 -0400
Reply-To: Tom Abernathy <tom.abernathy@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Tom Abernathy <tom.abernathy@GMAIL.COM>
Subject: Re: A data manupulation Question
So if that works then you can simplify the statement to just
if . < stdat <= datstop then delete;
On Tue, 21 Jun 2011 12:15:26 -0400, Tom Abernathy <tom.abernathy@GMAIL.COM>
>From your original example data you seem to be asking for this statement:
>if nmiss(datstop,stdat) = 0 then
> if not (datstop < stdat) then delete
>This statement can be read in English as
>When both DATSTOP and STDAT have values then delete cases where DATSTOP is
>not less than STDAT.
>If this doesn't work for your complete data then update your example with
>the cases where you want a different rule.
>On Tue, 21 Jun 2011 11:59:39 -0400, Tom Smith <need_sas_help@YAHOO.COM>
>>On Tue, 21 Jun 2011 11:54:20 -0400, Tom Smith <need_sas_help@YAHOO.COM>
>>>You are correct but also note that this problem is little more
>>>than any of you thought. plz find he two conditions below:
>>>1) if variable "STDAT" is not missing then keep the observations where
>>>DATSTOP < STDAT.
>>>Note: I think you both missed the part "if variable "STDAT" is not
>>>missing". here only talig about "STDAT", NOT bother "STDAT" and
>>>2)if variable "STDAT" or "STDAT" is missing then the observations
>>>Note: you are right any of them can be missing.
>>>Please help me. I am cofussed. Also nmiss fuction is not working for me.
>>>looks like I have a old sas version. Please make if compatable to old
>>>Thank you so much from the bottom of my heart.
>>Nmiss fuction is working. But the other codes for the conditions are not
>>quite correct. not givingthe correct result. can anyone please be kind
>>enough to look at the problem very carefully? Thanks. I am lost.