LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (October 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 12 Oct 1999 15:33:49 -0400
Reply-To:   ABELSOR <ABELSOR@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   ABELSOR <ABELSOR@WESTAT.COM>
Subject:   Re: Variable specifics
Comments:   To: Gina Yount <GINA.YOUNT@DFAS.MIL>
Content-Type:   text/plain; charset=US-ASCII

Gina,

You can use the SUBSTR function to look at the second character and test to see if it's alpha. Or, not a numeric (which takes less typing and may just do what you want):

data subset; set yourdata; if substr(yourvar,2,1) not in('0','1','2','3','4','5','6','7','8','9'); run;

HTH ______________________________________________________________________ |Bob Abelson |"Original thought is like original sin -| |Westat |both happened before you were born to | |An Employee-Owned Research |people you could not possibly have met."| |Corporation | | |ABELSOR@westat.com |- Fran Lebowitz | |_____________________________|________________________________________|

____________________Reply Separator____________________ Subject: Variable specifics Author: Gina Yount <GINA.YOUNT@DFAS.MIL> Date: 10/12/1999 1:02 PM

I'm very new to SAS and have been looking in books, but have not found a way to do the following.

I have a 4 digit variable that is set as a character string. I'm looking for all observations where the second digit is an alpha character.

I'd appreciate any guidance.

Thanks, Gina


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