<?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: Concatenation of values in an array? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Concatenation-of-values-in-an-array/m-p/253223#M48144</link>
    <description>&lt;P&gt;CATX using of to reference array.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CATX ("-", of array(*));&lt;/P&gt;</description>
    <pubDate>Mon, 29 Feb 2016 17:09:39 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-02-29T17:09:39Z</dc:date>
    <item>
      <title>Concatenation of values in an array?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenation-of-values-in-an-array/m-p/253222#M48143</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have the following table that is generated by a transpose statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID PrdGrp_1 PrdGrp_2 Prd_Grp_3 etc..&lt;/P&gt;
&lt;P&gt;1 1 . .&lt;/P&gt;
&lt;P&gt;2 1 3 .&lt;/P&gt;
&lt;P&gt;3 2 4 9&lt;/P&gt;
&lt;P&gt;etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above will have PrdGrp_n based on the transactional data prior to the transpose step.&lt;/P&gt;
&lt;P&gt;I am looking to create a variable that concatenates PrdGrp_1 to PrdGrp_n separated by '-' so it would look something like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID PrdGrp_1 PrdGrp_2 Prd_Grp_3 Description&lt;/P&gt;
&lt;P&gt;1 1 . . 1&lt;/P&gt;
&lt;P&gt;2 1 3 . 1-3&lt;/P&gt;
&lt;P&gt;3 2 4 9 2-4-9&lt;/P&gt;
&lt;P&gt;etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your help is greatly appreciated, thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 17:05:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenation-of-values-in-an-array/m-p/253222#M48143</guid>
      <dc:creator>DangIT</dc:creator>
      <dc:date>2016-02-29T17:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenation of values in an array?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenation-of-values-in-an-array/m-p/253223#M48144</link>
      <description>&lt;P&gt;CATX using of to reference array.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CATX ("-", of array(*));&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 17:09:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenation-of-values-in-an-array/m-p/253223#M48144</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-29T17:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenation of values in an array?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenation-of-values-in-an-array/m-p/253227#M48145</link>
      <description>&lt;P&gt;Just a note, you don't have to put them into an array in order to concatenate them:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Desp=catx('-', of Prodgrp:);
or 
Desp=catx('-', of prodgrp_1-prodprp_3);

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And be aware, this method is more tolerant than Array method, you won't get warning if you mix up Char variables with Num variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 17:17:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenation-of-values-in-an-array/m-p/253227#M48145</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2016-02-29T17:17:33Z</dc:date>
    </item>
  </channel>
</rss>

