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 (June 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 20 Jun 2006 10:11:19 -0400
Reply-To:     Venky Chakravarthy <swovcc@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Venky Chakravarthy <swovcc@HOTMAIL.COM>
Subject:      Re: increasing character by one (e.g. 'A' to 'B')
Comments: To: jashby2@GMAIL.COM

On Tue, 20 Jun 2006 06:59:30 -0700, jashby2@GMAIL.COM wrote:

>Hi, > >I have a character variable called ROW whose value is alphabetic (just >'A' through 'Z'). In certain instances, I need to increase ROW by one. > So if ROW='D' then ROW would need to be 'E'. > >This would be nice: >ROW=ROW+1; > >But SAS isn't happy about that one. > >Any elegant solutions to this questions? (I'm thinking some sort of >ASCII/hex/decimal manipulation, but not sure.) > >Thanks!! >J

So if you increase D to E what happens to the original E? Assuming all subsequent rows get incremented, what happens to Z?

Look at the RANK and BYTE functions. They could be used to get what you want but the rules have to be clarified on the above first.

Venky Chakravarthy


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