Date: Thu, 8 Nov 2007 14:07:59 -0500
Reply-To: Jack Clark <JClark@CHPDM.UMBC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Clark <JClark@CHPDM.UMBC.EDU>
Subject: Re: extracting from variables
Content-Type: text/plain; charset="us-ascii"
I think the problem is with the COMPRESS function. You are asking for
all '(', 'N' and ')' characters to be removed from the string - hence
the 'N' being removed from the start of 'NovaIguacu'.
Maybe you could use another function instead to remove the string
Additionally, when I run your code I get Notes in the log about "invalid
3rd argument to function substring" where AWAYTE is being calculated.
If you want all of the remaining string from the (H+1) point, you can
eliminate the third argument.
Hope this helps.
Center for Health Program Development and Management
University of Maryland, Baltimore County
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Sent: Thursday, November 08, 2007 7:42 PM
Subject: extracting from variables
I have the following:
Suppose I have variable event with some data like this:
length event$ 30.;
input event $;
Palmeiras$America FC SP
I want divide in 2 variables, home and away teams, then I tried:
table event hometeam awayteam;
but now I saw compress take my N from start of names, like Nova Iguacu
become ova Iguacu, I want remove exactly "(N)" from strings, what's the
tricky I need learn?
Thanks in advance,