<?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: Concatenating Variables with PREFIX in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Concatenating-Variables-with-PREFIX/m-p/458683#M116425</link>
    <description>&lt;P&gt;You can do that, however ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since code: also refers to a list of variables, you still need to add "of":&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="token function"&gt;catx&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'; '&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;, of&lt;/SPAN&gt;&amp;nbsp;code:&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Apr 2018 15:17:22 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-04-30T15:17:22Z</dc:date>
    <item>
      <title>Concatenating Variables with PREFIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenating-Variables-with-PREFIX/m-p/458679#M116422</link>
      <description>&lt;P&gt;I have an unknown number of variables that&amp;nbsp;have the same prefix for the variable name.&amp;nbsp; I want to concatenate all the fields into a single field separated by a semi-colon.&amp;nbsp; Is there a simple notation to do something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;catx('; ', code:)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I could&amp;nbsp;create a macro variable that gets the number of variables and then just do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;catx('; ', of code1-code&amp;amp;ncodes.)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but I thought I would see if there is a simpler notation.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 15:13:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenating-Variables-with-PREFIX/m-p/458679#M116422</guid>
      <dc:creator>djbateman</dc:creator>
      <dc:date>2018-04-30T15:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Variables with PREFIX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenating-Variables-with-PREFIX/m-p/458683#M116425</link>
      <description>&lt;P&gt;You can do that, however ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since code: also refers to a list of variables, you still need to add "of":&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="token function"&gt;catx&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'; '&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;, of&lt;/SPAN&gt;&amp;nbsp;code:&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 15:17:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenating-Variables-with-PREFIX/m-p/458683#M116425</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-04-30T15:17:22Z</dc:date>
    </item>
  </channel>
</rss>

