LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 19 Feb 2008 16:55:05 -0500
Reply-To:     Ya Huang <ya.huang@AMYLIN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ya Huang <ya.huang@AMYLIN.COM>
Subject:      Re: SAS Coding Question
Comments: To: zhuxuhong2000@GMAIL.COM

data xx; length newv $50; input x $50.; newv=left(tranwrd(tranwrd(tranwrd(x,'A;',''),'B;',''),'C;','')); cards4; A;B;C;south asian; C;Indian; A;C;B; ;;;;

proc print; run;

Obs newv x

1 south asian; A;B;C;south asian; 2 Indian; C;Indian; 3 A;C;B;

On Tue, 19 Feb 2008 13:41:22 -0800, Xuhong <zhuxuhong2000@GMAIL.COM> wrote:

>Hello folks, > >I need your help with my coding scheme. > >I have a variable falling into the following pattern: > >A;B;C;south asian; >C;Indian; >A;C;B; >... > >What I want is to find a method to create a new variable which will >contains >the text fields which are not the 'A' and 'B' and 'C'. > >Thanks a lot!


Back to: Top of message | Previous page | Main SAS-L page