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 (June 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 10 Jun 2008 03:52:09 -0700
Reply-To:     guya.carpenter@GMAIL.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         guya.carpenter@GMAIL.COM
Subject:      Re: length of numeric expression
Comments: To:
Content-Type: text/plain; charset=ISO-8859-1

On 10 Jun, 11:45, shashi <> wrote: > Is there any function or way either in Base SAS or in Proc Sql to find > the length of a numeric string including leading zeroes? > For example, > > Numeric expression length > 0401117 7 > > could anybody please suggest on this? > > Thanks, > Shashi

Something like this?

data length; length var $250; var='008487300'; output; var=' 00848730560 '; output; var='087498754'; output; var='8764'; output; run;

data length; set length; length=length(strip(var)); run;

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