Date: Thu, 20 Apr 2006 22:59:05 +0000
Reply-To: toby dunn <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: toby dunn <tobydunn@HOTMAIL.COM>
Subject: Re: Truncate numerical variables
In-Reply-To: <1145572958.724151.54040@i39g2000cwa.googlegroups.com>
Content-Type: text/plain; format=flowed
Mindy ,
Num = input( substr( put( <Var Name> , 8. -L ) , 1 , 3 ) , 8. ) ;
Toby Dunn
From: Mindy <zhumin80@GMAIL.COM>
Reply-To: Mindy <zhumin80@GMAIL.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject: Truncate numerical variables
Date: Thu, 20 Apr 2006 15:42:38 -0700
Hi, all,
I have some numerical variables, i.e.
1000
2000
30000
4000
Now I only want the first three digits of these numerical
variables,i.e.
100
200
300
400
How can I do this in SAS? I only know function SUBSTR but it is for
character variables.
Thank you,
Mindy
|