LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 1996, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 8 Oct 1996 09:39:46 -0700
Reply-To:   Gordon Cumming <Gordon.Cumming@KP.ORG>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Gordon Cumming <Gordon.Cumming@KP.ORG>
Subject:   Re: help with elegant delete statement
Comments:   cc: "l1jts0b%SANF.FRB.ORG (Return requested)" <l1jts0b@SANF.FRB.ORG>

>%LET MYLIST = VAR1 VAR2 VAR3 VAR4; > >DATA ONE; > SET MYDATASET; > IF VAR1 = . AND VAR2 = . AND VAR3 = . AND VAR4 = . THEN DELETE; >

The simplest way I know is as follows:

%LET MYLIST = VAR1,VAR2,VAR3,VAR4;

DATA ONE; SET MYDATSET; IF N(&MYLIST); ...

I do not know if this is elegant but looks simple enough. If the commas are a problem then use a macro to substitute commas for the separating blanks.


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