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')
On Tue, 20 Jun 2006 06:59:30 -0700, jashby2@GMAIL.COM wrote:
>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:
>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.)
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.