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 (January 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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)
Comments: To: Sebastian Hein <Sebastian.Hein@IWW.UNI-FREIBURG.DE>
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


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