Date: Wed, 12 Nov 2008 08:18:06 -0800
Reply-To: karma <dorjetarap@GOOGLEMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: karma <dorjetarap@GOOGLEMAIL.COM>
Organization: http://groups.google.com
Subject: Re: modifying a variable
Content-Type: text/plain; charset=ISO-8859-1
On 12 Nov, 15:47, sasuser.joe...@GMAIL.COM (joey m) wrote:
> Hi All:
>
> How can I go from something like this:
>
> 5501A
> 5402A
> 5803A
>
> to something like this?:
>
> 5501
> 5402
> 5803
>
> As always, thanks a lot for your help.
>
> J
You can compress out the alpha characters with compress's third option
data one;
input val$;
val2=compress(val,,'kd');
cards;
5501A
5402A
5803A
;
proc print;run;
|