<?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 Add space between two variable values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Add-space-between-two-variable-values/m-p/296099#M61956</link>
    <description>&lt;P&gt;I have a syntax like below. I what to add a space between two variable. Please help me on this&lt;/P&gt;&lt;PRE&gt;text2 = cats('"/user/path`',&amp;amp;year,put(lastmonth,nlstrmon.),'filename.txt','"');&lt;/PRE&gt;&lt;P&gt;for example I am expecting a output like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"/user/path/2016 AUGUST filename.txt"&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Sep 2016 11:56:35 GMT</pubDate>
    <dc:creator>jayakumarmm</dc:creator>
    <dc:date>2016-09-02T11:56:35Z</dc:date>
    <item>
      <title>Add space between two variable values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-space-between-two-variable-values/m-p/296099#M61956</link>
      <description>&lt;P&gt;I have a syntax like below. I what to add a space between two variable. Please help me on this&lt;/P&gt;&lt;PRE&gt;text2 = cats('"/user/path`',&amp;amp;year,put(lastmonth,nlstrmon.),'filename.txt','"');&lt;/PRE&gt;&lt;P&gt;for example I am expecting a output like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"/user/path/2016 AUGUST filename.txt"&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2016 11:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-space-between-two-variable-values/m-p/296099#M61956</guid>
      <dc:creator>jayakumarmm</dc:creator>
      <dc:date>2016-09-02T11:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Add space between two variable values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-space-between-two-variable-values/m-p/296103#M61959</link>
      <description>&lt;P&gt;Add a space before filename.txt?&lt;/P&gt;
&lt;P&gt;Otherwise switch from the CATS() function to a different version of the CAT family of functions that honours spaces.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the || operator as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: CATT trims trailing blanks, but keeps leading blanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2016 13:29:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-space-between-two-variable-values/m-p/296103#M61959</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-02T13:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Add space between two variable values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-space-between-two-variable-values/m-p/296104#M61960</link>
      <description>&lt;P&gt;Might&amp;nbsp;resort to&amp;nbsp;the old school way:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let year=2016;
data test;
lastmonth=8;
text2 = cats('"/user/path/',&amp;amp;year,' ',put(lastmonth,nlstrmon.),'filename.txt','"');
text_want='"/user/path/'||strip(&amp;amp;year)||' '||put(lastmonth,nlstrmon.)||' '||'filename.txt'||'"';
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Sep 2016 13:28:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-space-between-two-variable-values/m-p/296104#M61960</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2016-09-02T13:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Add space between two variable values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-space-between-two-variable-values/m-p/296109#M61962</link>
      <description>&lt;P&gt;Thanks a lot. It works great&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2016 13:42:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-space-between-two-variable-values/m-p/296109#M61962</guid>
      <dc:creator>jayakumarmm</dc:creator>
      <dc:date>2016-09-02T13:42:38Z</dc:date>
    </item>
  </channel>
</rss>

