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 (March 2007, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 30 Mar 2007 09:19:06 -0700
Reply-To:     Rune RunnestÝ <rune@FASTLANE.NO>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Rune RunnestÝ <rune@FASTLANE.NO>
Subject:      How to decide the case of words in a column in a dataset
Comments: To:
Content-Type: text/plain; charset="iso-8859-1"

I wonder how to find out what case a word in a column in a data set is in. I have made an example to illustrate the task. The field TEXT contains just one word. Does SAS have a function to use here ? Or how can I use regular expression if that is a possibility ?


data myds; infile datalines truncover; attrib text length = $10.; input @01 text $10.; datalines; Mixedcase UPPERCASER lowercase pepsi COLA Juice ; run; data two; set myds; length case $5.; if <some test> then case = 'upper' else if <some test> then case = 'mixed' else if <some test> then case = 'lower'; run;

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