Go Back   Rhinocerus > Newsgroup > Newsgroup comp.soft-sys.sas

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-15-2008, 11:21 AM
n
Guest
 
Posts: n/a
Default using tranwrd and translate on variables or in a loop

Hi all;

can the arguments of tranwrd and translate be variables?

I have a dataset with 2 columns. The first has the names of companies.
some of the names contain terms like ltd, co, limited etc. The second
variable has the list of such terms to be removed.
I need to remove each of the terms from each of the company name
wherever they occur.
I tried using tranwrd and translate but the replacement was only
rowwise.

ie

Name Terms_to_remove Result_obtained Result_desired
abc co ltd co abc ltd abc
abc co ltd abc co abc
abc limited limited abc abc
abc limited abc limited abc

Please tell me how could I do this using translate or tranwrd.
Is there any other better way to do this?

Thanks and regards


Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: use of tranwrd and translate on variables or in a loop Howard Schreier Newsgroup comp.soft-sys.sas 1 07-28-2008 10:58 AM
use of tranwrd and translate on variables or in a loop n Newsgroup comp.soft-sys.sas 0 07-15-2008 12:21 PM
Re: How to get "YET???" to become "YET?" Dorfman, Paul Newsgroup comp.soft-sys.sas 0 09-27-2006 03:01 PM



All times are GMT. The time now is 01:58 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.