Date: Wed, 29 Oct 2008 14:01:05 -0700
Reply-To: Akshaya <akshaya.nathilvar@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Akshaya <akshaya.nathilvar@GMAIL.COM>
Organization: http://groups.google.com
Subject: Re: how to clean characters from number data
Content-Type: text/plain; charset=ISO-8859-1
In addition to Jack's solution, this can be done using TRANWRD or
TRANSLATE functions, here's how:
Data have;
input weight $;
new_wt=input(tranwrd(weight,'kg',''),best8.);
new_wt1=input(translate(weight,'','kg'),best8.);
cards;
112
130kg
100 kg
;
Thanks!
Akshaya
|