<?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: Replace space with comma in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/500067#M278</link>
    <description>&lt;P&gt;I have never had to use commas with the IN operator.&lt;/P&gt;</description>
    <pubDate>Sat, 29 Sep 2018 03:26:55 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-09-29T03:26:55Z</dc:date>
    <item>
      <title>Replace space with comma</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/499662#M188</link>
      <description>&lt;P&gt;Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this and it works fine:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let have = 1 2 3;
%let want = %sysfunc(tranwrd(%quote(%trim(&amp;amp;have)),%str( ),%str(,)));
%put want=&amp;amp;want.;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;But if the user put more than one space between the numbers then it comes up as 1,2,,,3.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above code will not work for:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let have = 1 2     3;
%let want = %sysfunc(tranwrd(%quote(%trim(&amp;amp;have)),%str( ),%str(,)));
%put want=&amp;amp;want.;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 18:53:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/499662#M188</guid>
      <dc:creator>david27</dc:creator>
      <dc:date>2018-09-27T18:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Replace space with comma</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/499669#M192</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let have =%sysfunc(compbl( 1 2     3));
%let want = %sysfunc(tranwrd(%quote(%trim(&amp;amp;have)),%str( ),%str(,)));
%put want=&amp;amp;want.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Sep 2018 19:02:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/499669#M192</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-27T19:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Replace space with comma</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/499901#M244</link>
      <description>Why do you need to add commas?</description>
      <pubDate>Fri, 28 Sep 2018 13:44:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/499901#M244</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2018-09-28T13:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Replace space with comma</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/499916#M247</link>
      <description>&lt;P&gt;These numbers go inside an in statement. if number in (1,2,3). User may also not pass any value to the macro.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 14:36:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/499916#M247</guid>
      <dc:creator>david27</dc:creator>
      <dc:date>2018-09-28T14:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Replace space with comma</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/499984#M258</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215179"&gt;@david27&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;These numbers go inside an in statement. if number in (1,2,3). User may also not pass any value to the macro.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The SAS IN operator does not require commas any more though it used to.&lt;/P&gt;
&lt;P&gt;Also for INTEGER values a SAS IN comparison can use a range&amp;nbsp;indicated with a&amp;nbsp;colon:&amp;nbsp;Number in (1:3); is the same as Number in (1 2 3) or Number in (1,2,3).&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 17:52:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/499984#M258</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-28T17:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Replace space with comma</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/500016#M269</link>
      <description>&lt;P&gt;Thank You team for the responses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just learnt about the in operator not requiring comma(,) within parenthesis ACCIDENTALLY just today(because of a programming mistake i did).&lt;/P&gt;&lt;P&gt;By the way---From when did it change?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 19:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/500016#M269</guid>
      <dc:creator>david27</dc:creator>
      <dc:date>2018-09-28T19:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Replace space with comma</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/500067#M278</link>
      <description>&lt;P&gt;I have never had to use commas with the IN operator.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Sep 2018 03:26:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Replace-space-with-comma/m-p/500067#M278</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-09-29T03:26:55Z</dc:date>
    </item>
  </channel>
</rss>

