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 (July 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 23 Jul 2004 02:10:37 -0700
Reply-To:     x x <sas_user2000@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         x x <sas_user2000@YAHOO.COM>
Subject:      Position in a String
Content-Type: text/plain; charset=us-ascii

Hi all,

I am a newbie with 8.2 on WIN platform.

I have a dataset with a field which is or should be a 4 digit number entered as a character. Due to data entry error the field may have 1, 2, or 3 digits and in any position. ie "9 " or " 9 " or " 9 " or " 9". I do have a list of those numbers and i need to know what record they belong to but not knowing in what position the number or numbers may be I was wondering if there is a simpeler method that can look for the number or numbers any of the 4 positions in the field?

I have been using the following for each position which is time consuming. Is there an easier way?

data temp; set numberslist; if badnum ="9 " or badnum = " 9 " or badnum=" 9 " or badnum= " 9"; run;

Cheers

__________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail


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