Date: Thu, 14 Feb 2008 17:22:42 -0500
Reply-To: Mike Rhoads <RHOADSM1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mike Rhoads <RHOADSM1@WESTAT.COM>
Subject: Re: IsNumber or IsNumeric
Content-Type: text/plain; charset="us-ascii"
You've received a couple of good answers already.
Special variable lists may be useful. _CHARACTER_ can be used as a
variable list to refer to all character variables in a dataset.
From: Andrea Zimmerman [mailto:firstname.lastname@example.org]
Sent: Thursday, February 14, 2008 1:55 PM
To: Mike Rhoads
Subject: Re: [SAS-L] IsNumber or IsNumeric
Is there an effective way to use this function to check a whole field
that is listed as char but really contains just numbers?
I need to go through all my character fields and see if I can reclassify
any of them as numeric without losing information.
On 2/5/08, Mike Rhoads <RHOADSM1@westat.com> wrote:
If you are using version 9 of SAS, this is the perfect place for
NOTDIGIT function, which "searches a string for the first
any character that is not a digit":
IF NOTDIGIT(TRIM(Item_ID)) = 0 THEN Item_ID = '0' || Item_ID;
On Behalf Of fabergoogle
Sent: Tuesday, February 05, 2008 6:36 AM
Subject: IsNumber or IsNumeric
I have a field (Item_ID) which can contains numbers or text, for
The last 4 lines are numbers but the first 4 ones are texts.
I have only to manipulate the numeric items in order to add a
front of them to get:
Can you help me?