LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (July 2001, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 26 Jul 2001 11:57:26 -0400
Reply-To:     "Brittain, James" <zqr0@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Brittain, James" <zqr0@CDC.GOV>
Subject:      Convert characters to ASCII and back?
Comments: To: "SAS List Serve (E-mail)" <SAS-L@UGA.CC.UGA.EDU>
Content-Type: multipart/alternative;

I am sure there are some formats and informats to do what I am looking for but I can't seem to find the right ones. I need to take a character variable, make a new numeric variable, and then convert it back to the original character.

Here is the real problem:

I have data that is a list of variables that is shown in the range and I need to create a dataset with all of the variables. We are talking about multiple datasets with at least 1000 variables each so this has to be dynamic.

here is a sample of the data:

VARIABLE_RANGE ----------------------------- A1B1 - A1B5 B354 - B360

I need to get it to look like this:

VARIABLE ---------------- A1B1 A1B2 A1B3 A1B4 A1B5 B354 B355 B356 B357 B358 B359 B360

I have that part taken care of already. I isolated the root and the index and use a loop to output each variable with the incremented index. My problem is that sometimes the index is CHARACTER and SAS can't use that as an index. So I wanted to convert the CHARACTER index to the ASCII form and then convert it back before outputting it but I can't find the right format or informats.

Here is an example of the problem data:

VARIABLE_RANGE ------------------------------ A3A - A3E

Which should come out as:

VARIABLE ---------------- A3A A3B A3C A3D A3E


[text/html]


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