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 (January 2003, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 22 Jan 2003 01:58:04 +0000
Reply-To:   John Whittington <John.W@MEDISCIENCE.CO.UK>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   John Whittington <John.W@MEDISCIENCE.CO.UK>
Subject:   Re: selecting observations by upper and lower case
Comments:   To: Joseph Schuchter <joeschuc@HOTMAIL.COM>
In-Reply-To:   <E18b9hJ-0000KQ-00@coumxnn02.netbenefit.co.uk>
Content-Type:   text/plain; charset="us-ascii"; format=flowed

At 16:27 21/01/03 -0800, Joseph Schuchter wrote (in small part):

>I want to create a new variable called validate which basically says: >if value is in upper case then validate=1; >else validate=0;

Joe, something as simple as the following may be enough:

if upcase(var) = var then validate=1 ; else validate = 0 ;

This should give validate=1 for any value in which all the alpha characters are upper case, and validate=0 if any alpha character is in lower case.

Any help?

Kind Regards

John

---------------------------------------------------------------- Dr John Whittington, Voice: +44 (0) 1296 730225 Mediscience Services Fax: +44 (0) 1296 738893 Twyford Manor, Twyford, E-mail: John.W@mediscience.co.uk Buckingham MK18 4EL, UK mediscience@compuserve.com ----------------------------------------------------------------


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