Date: Fri, 11 Jan 2002 07:29:22 -0500
Reply-To: "Chakravarthy, Venky" <Venky.Chakravarthy@PFIZER.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Chakravarthy, Venky" <Venky.Chakravarthy@PFIZER.COM>
Subject: Re: max(x)
Content-Type: text/plain; charset="iso-8859-1"
Sebastian,
If you want to make the MAX function work, use PROC SQL. The same MAX
function will operate on the whole set of data.
data q ;
input X ;
cards ;
.
2
5
7
3
.
;
run ;
proc sql ;
create table w as
select x, max(x) as z
from q ;
quit ;
Kind Regards,
Venky
#****************************************#
# E-mail: venky.chakravarthy@pfizer.com #
# swovcc@hotmail.com #
# Phone: (734) 622-1963 #
#****************************************#
-----Original Message-----
From: Sebastian Hein [mailto:Sebastian.Hein@IWW.UNI-FREIBURG.DE]
Sent: Friday, January 11, 2002 3:48 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: max(x)
First I'd like to thank to you good people, who made all helpful
contributions to my beginners questions on RETAIN or better: lag/ diff/
merge-firstobs solution posted yesterday.
Sorry to bother you with another - probably - simple question:
How can I get the maximum value from a list (column not row) of values
and store it in a new variable "Z" ? max(X) does not work, because there
is only one value inside (see handbook).
X Z
. 2
2 2
5 2
7 2
3 2
. 2
|