Date: Tue, 23 Jun 2009 11:03:17 -0400
Reply-To: Akshaya <akshaya.nathilvar@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Akshaya <akshaya.nathilvar@GMAIL.COM>
Subject: Re: delete repeat
Content-Type: text/plain; charset=ISO-8859-1
Following code may not work in all scenarios, play with (_string) variable
to concatenate more words to get rid of duplicates from your real data.
infile cards truncover;
input reason $200.;
subject left visit to make a phone call subject left visit to make a phone
subject terminated violation of inclusion criteria subject terminated
violation of inclusion criteria
do _i=1 to countw(reason);
if indexw(substr(reason,position),_string) then
drop _: position length;
On Tue, Jun 23, 2009 at 9:32 AM, inason <email@example.com> wrote:
> Hi Guys,
> I'm wondering if there is a sas function that deletes duplications.
> So if a variable had a repeat of text, is there a function of getting
> rid of the repeat.
> X= subject left visit to make a phone callsubject left visit to make a
> phone call.
> in teh dataset I got end of sentence and repeat are together as above