|
This one should work, still use "where type in (....)", but this time
in Proc SQL with group by statment. Again, no need to loop.
proc sql;
select *, max(x), min(x), mean(x)
from clt
where type in ('0','1','2','3','4','5','6','7','8','9','d','v','i','z')
group by type
;
Thanks
Ya Huang
-----Original Message-----
From: Huang, Ya
Sent: Thursday, November 04, 1999 10:51 AM
To: Huang, Ya; 'kkana@MY-DEJA.COM'; 'SAS-L@LISTSERV.UGA.EDU'
Subject: RE: creating loop (sorry, I was wrong)
Sorry, I was wrong! So stupid!
-----Original Message-----
From: Huang, Ya
Sent: Thursday, November 04, 1999 10:42 AM
To: 'kkana@MY-DEJA.COM'; SAS-L@LISTSERV.UGA.EDU
Subject: RE: creating loop
where type in ('0','1','2','3','4','5','6','7','8','9','d','v','i','z');
Dosen't seem to need a loop.
Ya Huang
-----Original Message-----
From: kkana@MY-DEJA.COM [mailto:kkana@MY-DEJA.COM]
Sent: Thursday, November 04, 1999 5:51 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: creating loop
Hello Sas users,
Can any one help me How to create a loop for the following.
I am finding Max, min and mean values for certain fields based on field
called 'type'.The type field contains 0 to 9 and d,v,i,z.
My code is like this
Proc means Data=clt max min mean;
where type='0'
var ---
;
;
I am repeating this for every 'Type'.
I want to put 'type ' field in Loop and code proc means only one time
in my program.
Thanks in Advance
KK
Sent via Deja.com http://www.deja.com/
Before you buy.
|