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 (December 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 23 Dec 2008 06:14:09 -0800
Reply-To:     Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject:      Re: Max of a alpha column
Comments: To: Nathaniel.Wooding@DOM.COM
Content-Type: text/plain; charset="iso-8859-1"

Given the series of questions today, I'm beginning to wonder if we're doing his homework for him (or her, as the case may be).

-- Jack Hamilton jfh@alumni.stanford.org

-----Original Message----- From: Nat Wooding <Nathaniel.Wooding@DOM.COM> Sent: Tuesday, December 23, 2008 5:40 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: [SAS-L] Max of a alpha column

Here, you use a function, Length, to find the lenfths of the variables and either Proc Summar or Proc Means to find the maximum value from the observations:

Data string; input str $15. ; StrLen = length(str ); cards; a abc abcdef abcdefg run;

Proc Summary; Output out = MaxSet Max = StrMax; var StrLen; proc print;run;

Proc Means and Summary have a lot more options available -- I am giving you the very basic code.

By the way, another way to find a maximum value is to sort the data set.

Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977

ash007 <RamsamyAshley@GM AIL.COM> To Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU Discussion" cc <SAS-L@LISTSERV.U GA.EDU> Subject Max of a alpha column

12/23/2008 05:02 AM

Please respond to ash007 <RamsamyAshley@GM AIL.COM>

How to find the max of the length of an alpha variable ?

Thanks.

ash007.

CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and/or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.


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