Date: Tue, 22 May 2001 14:35:57 +0100
Reply-To: kenny_boylan@STANDARDLIFE.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Kenny Boylan <kenny_boylan@STANDARDLIFE.COM>
Subject: Re: how to test lowcase and upcase
Content-type: multipart/mixed;
Boundary="0__=LTJeCuKy0FmRWF0pdQqQy09htffoit2yYrpFeiTXb2zD5XB4gWQW4VSg"
Using the Scan and Compress functions will do the trick.
data x;
length var1 var2 $ 20;
var='THISisatest';
var1=scan(var,1,'abcdefghijklmnopqrstuvwxyz');
var2=compress(var,var1);
run;
Gives you var1='THIS' var2='isatest'
Cheers
andrade@inep.gov.br on 22/05/2001 14:16:51
Please respond to andrade@inep.gov.br
To: SAS-L@LISTSERV.UGA.EDU
cc: (bcc: Kenny Boylan/STANDARD LIFE ASSURANCE COMPANY)
Subject: how to test lowcase and upcase
Hi all,
I have a variable with both lowcase and upcase characters, so I
would like to separate into two variables then lowcase and upcase texts.
See a example:
Var1
JEGUEbode
JABArapadura
So, I would like to get:
Var2 Var3
JEGUE bode
JABA rapadura
How can I do that? I think I have to test if the sequence of
character is or not upcase (lowcase).
Thanks.
Ailton
att1.eml [application/octet-stream]
The Standard Life Assurance Company, Standard Life House, 30 Lothian Road,
Edinburgh EH1 2DH, is registered in Scotland (No. SZ4) and regulated by
the Personal Investment Authority. Tel: 0131 225 2552 - calls may be
recorded or monitored. This confidential e-mail is for the addressee only.
If received in error, do not retain/copy/disclose it without our consent
and please return it to us. We virus scan all e-mails but are not
responsible for any damage caused by a virus or alteration by a third
party after it is sent.