Date: Tue, 1 Feb 2000 11:06:11 -0500
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Laurie Abell <laurie_abell@DOFASCO.CA>
Subject: Re: delete many variables
take a look at this sample program that will drop variables with all MISSING
values from a dataset.
you can easily modify it to be used for your situation
> -----Original Message-----
> From: Hui Huang [SMTP:huihuang@IUPUI.EDU]
> Sent: Tuesday, February 01, 2000 10:22 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: delete many variables
> Hi all,
> Is there any way to delete many variables from a dataset?
> For exampl dataset AAA looks like this:
> c1 c2 c2 c4
> 1 0 1 0
> 0 0 1 0
> 1 0 1 0
> I want to delete variable c2 and c4 because every obs' value is 0
> for those variables. My point is how to delete some variables with all
> values of obs in those variables 0's, but you don't know exactly which
> variables have this property in advance, and therefore need to use some
> sentences to do the judgement work?
> Any responses will be appreciated.