Date: Sun, 8 Mar 2009 12:56:50 -0400
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: DATASTEP Delete Row
You could do it by only including records that are present in all three
files. E.g.,
data complete;
merge mydata2 (in=a) mydata3 (in=b) mydata4 (in=c);
by col1;
if a and b and c;
run;
Art
-------
>/*STEP HERE where any row that is missing col2, col3, and/or col4 value,
it
>is deleted entirely */
>run;
On Sun, 8 Mar 2009 11:23:15 -0500, OR Stats <stats112@GMAIL.COM> wrote:
>Hello:
>
>I have a m x n dataset that I create in a merge step of my Data step. I
>would like to delete any row where there is a missing value in any column
>n.
>E.g.,
>mydata2 is m x 2, where the first column is col1 and second column is col2
>mydata3 is m x 2, where the first column is col1 and second column is col3
>mydata4 is m x 2, where the first column is col1 and second column is col4
>
>data complete;
>merge mydata2 mydata3 mydata4;
>by col1;
>/*STEP HERE where any row that is missing col2, col3, and/or col4 value,
it
>is deleted entirely */
>run;
>
>Does anyone have the syntax for this?
>
>Thanks!
|