Help using Base SAS procedures

SAS version of find and replace ?

Accepted Solution Solved
Reply
Super Contributor
Posts: 279
Accepted Solution

SAS version of find and replace ?

I'm helping a coworker combine and clean 84 csv files. I have imported them and combined them into one SAS data set. For some reason, her csv files have some odd-looking characters in place of apostrophes, quotes and in a few cases, the letter 'e'.

 

Here's a list of what I have vs what I want. The var in question is desc.

 

’ should become '

é should be e

è should be e

“ should be "

”  should also be "

•  I want to delete (suppress?) it

– and — delete (suppress?)  them.


Accepted Solutions
Solution
‎12-15-2016 03:19 PM
Super User
Posts: 19,873

Re: SAS version of find and replace ?

TRANSLATE -> Find/Replace

COMPRESS() -> Remove entirely

 

 

View solution in original post


All Replies
Solution
‎12-15-2016 03:19 PM
Super User
Posts: 19,873

Re: SAS version of find and replace ?

TRANSLATE -> Find/Replace

COMPRESS() -> Remove entirely

 

 

Super Contributor
Posts: 279

Re: SAS version of find and replace ?

Can you show me the difference between TRANSLATE and TRANWRD?  I read about it but can't see the distinction.

Super User
Posts: 19,873

Re: SAS version of find and replace ?

TRANSLATE is for single characters

TRANWRD is for words or sets of characters

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 290 views
  • 1 like
  • 2 in conversation