[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: SAS Help
From:       Venky Chakravarthy <swovcc () HOTMAIL ! COM>
Date:       2006-11-30 19:25:40
[Download RAW message or body]

On Thu, 30 Nov 2006 13:36:27 -0500, Saravanan Ramasamy
<rm.saravanan@GMAIL.COM> wrote:

>Hello,
>I have a dataset of 300k observations with a variable called number. It's
>numeric with length between 5-9 bytes. I want to make it 10 bytes for all
>the 300k observations with leading zero's.
>
>Example:
>
>345678
>213987654
>575854
>
>The output should be
>
>0000345678
>0213987654
>0000575854
>
>Can you anyone tell me how I can code in SAS to get the desired output.
>
>Any help would be appreciated.
>
>Thanks,
>Saravanan

I will have to side with data _null_. You have mentioned 5-9 bytes. A
numeric variable has a maximum of 8 bytes. How did you arrive at the 5-9
byte range? Is that by looking at the displayed values or using the length
function. What does PROC CONTENTS say about this variable?

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic