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 (February 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 27 Feb 2007 16:27:45 -0800
Reply-To:   Jeanina Worden <jworden@PDD.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Jeanina Worden <jworden@PDD.NET>
Subject:   Re: "Upcase" doesn't work after "reverse"
Comments:   To: Kevin Zhang <zhanglitt@YAHOO.COM>
Content-Type:   text/plain; charset="iso-8859-1"

Have you tried to use propcase, instead of upcase/lowcase, on the whole (new) string?

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of Kevin Zhang Sent: Tuesday, February 27, 2007 3:33 PM To: SAS-L@LISTSERV.UGA.EDU Subject: "Upcase" doesn't work after "reverse"

I am trying to create a new name that is the reverse of the original name with first letter uppercase and remaining letter lower case. ie. if the name="ABCD",then the new name should appear as "Dcba",

But the following simple program doesn't work, I really need your help.

Thank you Li.

------------------------- data a; input name $; cards; ABCD EFGH ; run; data a; set a; a=reverse(name); new_name=upcase(substr(a,1,1))||lowcase(substr(a,2)); run;

____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com


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