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
|