Date: Thu, 10 Nov 2005 17:18:09 +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: how to remove trailing characters
In-Reply-To: <1131641672.851489.192770@g14g2000cwa.googlegroups.com>
Content-Type: text/plain; format=flowed
Jerry,
Try:
var1 = scan(var1,1,'_') ;
Toby Dunn
From: Jerry <greenmt@GMAIL.COM>
Reply-To: Jerry <greenmt@GMAIL.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject: how to remove trailing characters
Date: Thu, 10 Nov 2005 08:54:32 -0800
Hi,
I have a character variable called TYPE, the pattern of its value is
that the last 4 characters alway start with an underscore "_", looks
like the following:
acb_vmf
arrkkk_kfe
pppppp_ert
.....
I simply want to remove the last 4 characters starting from the
underscore "_". I guess SAS function "compress" is not able to handle
this job (I may well be wrong).
Could anyone give me a clue how to archive my goal?
Thanks
Jerry
|