<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to Use the 'TRANWRD' while  creating the Macro Variable? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831469#M328566</link>
    <description>&lt;P&gt;It worked. thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3443"&gt;@Kc2&lt;/a&gt;&amp;nbsp;.&amp;nbsp; %str making the difference? we need to use the '%str' in these scenarios?&amp;nbsp; how to use if there is double space needed instead of single space? Can I use like below double space between double quotes in the second %str option.&lt;/P&gt;
&lt;P&gt;%let wantlist = %sysfunc(tranwrd(&amp;amp;havelist,%str(,),%str("&amp;nbsp; ")));&lt;/P&gt;</description>
    <pubDate>Thu, 01 Sep 2022 19:39:15 GMT</pubDate>
    <dc:creator>SASuserlot</dc:creator>
    <dc:date>2022-09-01T19:39:15Z</dc:date>
    <item>
      <title>How to Use the 'TRANWRD' while  creating the Macro Variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831462#M328560</link>
      <description>&lt;P&gt;I am looking to create macro variable which contains the list of variables from the dataset. I am going to use the same list in different places of my big macro.&amp;nbsp; My requirement is , I want to replace the&amp;nbsp; 'comma' (,) symbol with a one blank space where ever needed. I tried the&amp;nbsp; ' TRANWRD' along with the "%sysfunc" . Unfortunately I can not get the output I am expected. Thank you for your suggestions.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let havelist= %str(company,month,expenses,adjustment,balance);

%let wantlist = %sysfunc(tranwrd(&amp;amp;havelist,","," "));

* looking &amp;amp;wantlist display as 'company month expenses adjustment balance';

%put &amp;amp;havelist ;
%put &amp;amp;wantlist&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 19:07:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831462#M328560</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-09-01T19:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use the 'TRANWRD' while  creating the Macro Variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831465#M328563</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let havelist= %str(company,month,expenses,adjustment,balance);

%let wantlist = %sysfunc(tranwrd(&amp;amp;havelist,%str(,),%str( )));

* looking &amp;amp;wantlist display as 'company month expenses adjustment balance';

%put &amp;amp;havelist ;
%put &amp;amp;wantlist;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Sep 2022 19:28:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831465#M328563</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-09-01T19:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use the 'TRANWRD' while  creating the Macro Variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831468#M328565</link>
      <description>&lt;P&gt;try this code;&lt;/P&gt;
&lt;P&gt;%let havelist= %str(company,month,expenses,adjustment,balance);&lt;/P&gt;
&lt;P&gt;%let wantlist = %sysfunc(tranwrd(%quote(&amp;amp;havelist),%str(,),%str( )));&lt;/P&gt;
&lt;P&gt;* looking &amp;amp;wantlist display as 'company month expenses adjustment balance';&lt;/P&gt;
&lt;P&gt;%put &amp;amp;havelist ;&lt;BR /&gt;%put &amp;amp;wantlist;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 19:31:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831468#M328565</guid>
      <dc:creator>Kc2</dc:creator>
      <dc:date>2022-09-01T19:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use the 'TRANWRD' while  creating the Macro Variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831469#M328566</link>
      <description>&lt;P&gt;It worked. thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3443"&gt;@Kc2&lt;/a&gt;&amp;nbsp;.&amp;nbsp; %str making the difference? we need to use the '%str' in these scenarios?&amp;nbsp; how to use if there is double space needed instead of single space? Can I use like below double space between double quotes in the second %str option.&lt;/P&gt;
&lt;P&gt;%let wantlist = %sysfunc(tranwrd(&amp;amp;havelist,%str(,),%str("&amp;nbsp; ")));&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 19:39:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831469#M328566</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-09-01T19:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use the 'TRANWRD' while  creating the Macro Variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831471#M328568</link>
      <description>&lt;P&gt;Yes, quotes aren't required in macro functions so you need to mask the string in another way.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 19:39:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831471#M328568</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-09-01T19:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use the 'TRANWRD' while  creating the Macro Variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831472#M328569</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 19:40:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831472#M328569</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-09-01T19:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use the 'TRANWRD' while  creating the Macro Variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831491#M328584</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/350312"&gt;@SASuserlot&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am looking to create macro variable which contains the list of variables from the dataset. I am going to use the same list in different places of my big macro.&amp;nbsp; My requirement is , I want to replace the&amp;nbsp; 'comma' (,) symbol with a one blank space where ever needed. I tried the&amp;nbsp; ' TRANWRD' along with the "%sysfunc" . Unfortunately I can not get the output I am expected. Thank you for your suggestions.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let havelist= %str(company,month,expenses,adjustment,balance);
%let wantlist = %sysfunc(tranwrd(&amp;amp;havelist,","," "));

* looking &amp;amp;wantlist display as 'company month expenses adjustment balance';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;There are NOT any commas enclosed in double quote characters in &amp;amp;HAVELIST, so the TRANWRD() function will just return the original value.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 23:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Use-the-TRANWRD-while-creating-the-Macro-Variable/m-p/831491#M328584</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-09-01T23:46:00Z</dc:date>
    </item>
  </channel>
</rss>

