Date: Tue, 23 Jun 2009 13:46:41 -0700
Reply-To: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject: Re: How to check first few digits from Numeric variable
Content-Type: text/plain; charset="us-ascii"
IF, your numerics are the same length
all of the time, you could mimic the
substr using INT() and division. e.g.
ABC = 111222333; output;
ABC = 444555666; output;
x = 10**6; * just to show you the divisor for shifting 6 positions ;
y = int(ABC/10**6);
Hope this is helpful.
Investment Business Intelligence
Investment Management & Research
Global Leaders in Multi-Manager Investing
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Abc
Sent: Tuesday, June 23, 2009 1:37 PM
Subject: How to check first few digits from Numeric variable
I have a numeric variable and values like below.
ABC = 111222333
Is there anyway to check first three digit of numeric value?
something like 'like' operator.
Currently First, I have to conver it to the Character and use substr
function to check first three byte of the vairable.