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 (October 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 30 Oct 2008 08:42:54 -0400
Reply-To:     Ricardo Silva <Ricardo.Silva@SAS.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ricardo Silva <Ricardo.Silva@SAS.COM>
Subject:      Help in Completing with zeros
Content-Type: text/plain; charset="iso-8859-1"

Hi,

This question is related with another I posted two days ago, concerning the selection of the first two digits of a number. I'm using the following statment:

CEP= SUBSTR(STRIP(PUT(X,BEST32.)),1,2)*1 ;

which is working well.

However, the variable X must contain 8 digits, but sas is hiding the zeros (0) when it is in the begning of the number, p.e., 03121212 appears as 3121212. So when I select the 2 digits I need I got 31 instead of 03.

How can I fix this?

Thanks,

Rick


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