using tranwrd and translate on variables or in a loop
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
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
|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|