<?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: Concatenate dynamic columns starting with a string and numeric in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-dynamic-columns-starting-with-a-string-and-numeric/m-p/674899#M203263</link>
    <description>&lt;P&gt;Provided, that your posted data is representable, you could do&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input (var1 var_1 var2 var_2 var3 var_3)($);
datalines;
a b c d e f
;

data want;
   set have;
   var_conc = catx(',', of var1-var3);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 06 Aug 2020 05:35:09 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2020-08-06T05:35:09Z</dc:date>
    <item>
      <title>Concatenate dynamic columns starting with a string and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-dynamic-columns-starting-with-a-string-and-numeric/m-p/674896#M203262</link>
      <description>&lt;P&gt;Hi, Is there a better way to concatenate all these variables that starting with a variable name var and a value attached?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Eg.&lt;/P&gt;
&lt;P&gt;var1&lt;/P&gt;
&lt;P&gt;var2&lt;/P&gt;
&lt;P&gt;var3&lt;/P&gt;
&lt;P&gt;var4&lt;/P&gt;
&lt;P&gt;var5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is what I got now, but would pick up variables like var_ which not needed.&lt;/P&gt;
&lt;P&gt;var_conc= catx(',', of var:);&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;</description>
      <pubDate>Thu, 06 Aug 2020 05:14:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-dynamic-columns-starting-with-a-string-and-numeric/m-p/674896#M203262</guid>
      <dc:creator>ywon111</dc:creator>
      <dc:date>2020-08-06T05:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate dynamic columns starting with a string and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-dynamic-columns-starting-with-a-string-and-numeric/m-p/674899#M203263</link>
      <description>&lt;P&gt;Provided, that your posted data is representable, you could do&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input (var1 var_1 var2 var_2 var3 var_3)($);
datalines;
a b c d e f
;

data want;
   set have;
   var_conc = catx(',', of var1-var3);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Aug 2020 05:35:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-dynamic-columns-starting-with-a-string-and-numeric/m-p/674899#M203263</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-08-06T05:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate dynamic columns starting with a string and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-dynamic-columns-starting-with-a-string-and-numeric/m-p/675176#M203392</link>
      <description>Thanks but this is what I have and need:&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;keep skill:;&lt;BR /&gt;set have;&lt;BR /&gt;&lt;BR /&gt;How do I concatenate all the skill variables?</description>
      <pubDate>Fri, 07 Aug 2020 04:23:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-dynamic-columns-starting-with-a-string-and-numeric/m-p/675176#M203392</guid>
      <dc:creator>ywon111</dc:creator>
      <dc:date>2020-08-07T04:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate dynamic columns starting with a string and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-dynamic-columns-starting-with-a-string-and-numeric/m-p/675177#M203393</link>
      <description>&lt;P&gt;Why do you change your question half-way?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What exactly do you want? To keep the&amp;nbsp; SKILL:&amp;nbsp; variables but not the&amp;nbsp; SKILL_:&amp;nbsp; variables?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show us the proc contents of your table, and describe &lt;STRONG&gt;exactly&lt;/STRONG&gt; what you want to concatenate.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 05:03:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-dynamic-columns-starting-with-a-string-and-numeric/m-p/675177#M203393</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-08-07T05:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate dynamic columns starting with a string and numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-dynamic-columns-starting-with-a-string-and-numeric/m-p/675352#M203462</link>
      <description>I've got a long list of skill1, skill2, skill3, skill4, etc variables and need to concatenate all these variables to one. There's a variable skill_ which is not required.&lt;BR /&gt;Thanks</description>
      <pubDate>Sat, 08 Aug 2020 03:29:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-dynamic-columns-starting-with-a-string-and-numeric/m-p/675352#M203462</guid>
      <dc:creator>ywon111</dc:creator>
      <dc:date>2020-08-08T03:29:42Z</dc:date>
    </item>
  </channel>
</rss>

