title: Substitute text in a macro variable in SAS
body: <p>I want to change any instances of a period in a macro variable to underscore. What am I doing wrong?</p>
  
  <pre><code>%let pow=0.1;
  %let x = %sysfunc(tranwrd(&amp;pow,".","_"));
  %put x=&amp;x;
  </code></pre>
  
  <p>Output:</p>
  
  <blockquote>
    <p>x=0.1</p>
  </blockquote>