DATA Step, Macro, Functions and more

How to transform names in European native language into English names

Reply
Occasional Contributor
Posts: 9

How to transform names in European native language into English names

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.

Super User
Posts: 3,260

Re: How to transform names in European native language into English names

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 

Super User
Super User
Posts: 7,977

Re: How to transform names in European native language into English names

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.

 

SAS Super FREQ
Posts: 708

Re: How to transform names in European native language into English names

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

 

Bruno

Occasional Contributor
Posts: 9

Re: How to transform names in European native language into English names

Posted in reply to Bruno_SAS

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"...

 

Respected Advisor
Posts: 4,930

Re: How to transform names in European native language into English names

Yes, you should install NLS.

PG
Ask a Question
Discussion stats
  • 5 replies
  • 209 views
  • 6 likes
  • 5 in conversation