LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2000, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 1 Feb 2000 11:06:11 -0500
Reply-To:     laurie_abell@DOFASCO.CA
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Laurie Abell <laurie_abell@DOFASCO.CA>
Subject:      Re: delete many variables
Comments: To: huihuang@IUPUI.EDU
Content-Type: text/plain

take a look at this sample program that will drop variables with all MISSING values from a dataset. http://ftp.sas.com/techsup/download/observations/3q96/hahl/dropvar.sas

you can easily modify it to be used for your situation

Laurie

> -----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. > > Hui


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