Date: Thu, 9 Nov 2006 15:20:40 +0000
Reply-To: toby dunn <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: toby dunn <tobydunn@HOTMAIL.COM>
Subject: Re: find and drop empty variables
Content-Type: text/plain; format=flowed
Data One ;
Infile Cards ;
Input A B C $ D $ ;
1 . A .
2 . B .
3 . C .
.. . D .
5 . . .
6 . F .
ODS Listing Close ;
ODS Output OneWayFreqs = Freqs ;
Data = One ;
Table _All_ / Missing ;
ODS Listing ;
Data Missing ( Keep = Var ) ;
Set Freqs ;
Where Percent = 100 ;
Var = Scan( Table , 2 , ' ' ) ;
If ( InPut( VValueX( Var ) , 8. ) = . ) ;
Proc SQL NoPrint ;
Select Var Into : DropVars Separated By ' '
From Missing ;
Data One ;
Set One ( Drop = &DropVars ) ;
Quickly, bring me a beaker of wine, so that I may wet my mind and say
Wise people, even though all laws were abolished, would still lead the same
You should not decide until you have heard what both have to say.
On 11/9/06, Alexander Norderwind <firstname.lastname@example.org> wrote:
>I have the problem that a big database I import to SAS with proc sql and
>ODBC has about thousand variables (fields) and lots of them are empty all
>Thus I would like dropping them to get rid of this ballast.
>Therefore I first have to find out, which of them really are empty.
>Does anybody have a suggestion how to solve my problem?
>Would be nice!
Stay in touch with old friends and meet new ones with Windows Live Spaces