I think you should put % before the macro translate, or the
statement should be:
%let FinalFileEndingName = %translate(&word,"_",".");
J S Huang
>>> Hari <excel_hari@YAHOO.COM> 1/24/2006 12:13:12 PM >>>
I want to use Translate function to convert some of the "illegal
characters" to good one.
I have a macro variable &word which might have a value "US.2M" (name
a market). I want to assign this value to a particular data file
has data only for US.2M market).
Since periods in a name cause problem, so I would like to create a new
macro variable called FileEndingName in which I have taken care of
problematic characters and then use this new macro variable as part of
my new data set name.
I tried something like
%let FinalFileEndingName = translate(&word,"_",".");
But when I PUT the variable FinalFileEndingName to Log using %put
I get -- translate(US.2M,"-",".") --
In the above case it is not treating TRANSLATE as a function but
as a literal text?
Please suggest ways to overcome my problem.