BookmarkSubscribeRSS Feed
dayuan
Obsidian | Level 7

Hi,

 

I am processing people names, and I find sometimes the names are in native language. For example, names are spelled like "André " or "Martínez". Currently I am manually tranforming such names into English one by one (e.g. "Andre" or "Martinez"), but there are so many names that I feel a little overwhelmed. I would really appreciate it if someone could kindly teach me a quicker way. Thank you very much in advance.

5 REPLIES 5
SASKiwi
PROC Star

If your problem is caused by different language encodings then this paper may help, in particular the conversion macro included:

 

http://support.sas.com/resources/papers/Multilingual_Computing_with_SAS_94.pdf 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well, its a tricky one, as names could be anything.  My suggestion would be to create a coded list.  To do this, do a select distinct values of name from your dataset.  Then go through the distinct list and add in the decoded value, e.g.:

CODE         DECODE

André          Andre

...

Then simply use that coded list to replce the original.  I would imagine that you will need to do at least some manual review, I mean you could setup some programmatic conversions, but some will just be really random.

 

BrunoMueller
SAS Super FREQ

Have a look at the BASECHAR function, it might just do what you want.

 

Bruno

dayuan
Obsidian | Level 7

Hi Bruno,

 

Thank you very much for the useful tip. In order to use the function of BASEDCHAR, should I install "National Language Support (NLS)" as an addition? Since currently the log suggests that "The function BASECHAR is unknown, or cannot be accessed"...

 

PGStats
Opal | Level 21

Yes, you should install NLS.

PG
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1828 views
  • 6 likes
  • 5 in conversation