Date: Fri, 9 Nov 2007 14:38:42 -0500
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: Multiple variables quesiton
Mike,
I don't know if this is any easier than Paige's suggestion, but it avoids
having to deal with the nuances of macro variables:
data have;
input a b c d e;
cards;
1 0 2 0 0
0 0 0 0 0
2 0 0 1 0
3 0 0 0 0
;
proc transpose data=have out=temp1;
run;
data temp2;
set temp1;
if min(of col1-col4) + max(of col1-col4) ne 0;
run;
proc transpose data=temp2 out=want (drop=_:);
run;
HTH,
Art
---------
On Fri, 9 Nov 2007 10:19:59 -0800, mholmes@CUESTA.EDU wrote:
>Hello all,
> I am working with a dataset with ~200 variables and ~100
>observations each. Most of the data are zeros. Is there a way to
>delete all of the variables that have all zero values? The If/then
>only seems to work for individual variables. Thanks.
>
>Mike