<?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 data in multiple rows in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Concatenate-data-in-multiple-rows/m-p/498309#M15514</link>
    <description>&lt;P&gt;Please post test data in the form of a datastep in future, as such this is untested:&lt;/P&gt;
&lt;PRE&gt;data want;
  set have;
  length full $2000;
  retain full;
  by id;
  full=ifc(first.id,full,catx(",",full,block_street_name);
run;&lt;/PRE&gt;</description>
    <pubDate>Mon, 24 Sep 2018 07:48:32 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-09-24T07:48:32Z</dc:date>
    <item>
      <title>Concatenate data in multiple rows</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Concatenate-data-in-multiple-rows/m-p/498299#M15513</link>
      <description>&lt;BR /&gt;I have a dataset that have one id and multiple block and street names.I need to place together all the blocks and street names of an id together by concatenating separated by a comma.&lt;BR /&gt;The dataset looks like this.&lt;BR /&gt;&lt;BR /&gt;ID block street name&lt;BR /&gt;Ttk1 104A John's street&lt;BR /&gt;104B John's street&lt;BR /&gt;Ttk2 614 Mary street&lt;BR /&gt;615 Mary street&lt;BR /&gt;616 Mary street&lt;BR /&gt;617 Mary street&lt;BR /&gt;618 Mary street&lt;BR /&gt;Ttk3 415 Brooklyn street&lt;BR /&gt;Ttk4 202 Nashville street&lt;BR /&gt;203 Nashville street&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The final dataset should look like this.&lt;BR /&gt;Ttk1 104A John's street,104B&lt;BR /&gt;John's street&lt;BR /&gt;Ttk2 614 Mary street,615&lt;BR /&gt;Mary street,616 Mary street,&lt;BR /&gt;617 Mary street,618 Mary street&lt;BR /&gt;Ttk3 415 Brooklyn street&lt;BR /&gt;Ttk4 202 Nashville street,203&lt;BR /&gt;Nashville street&lt;BR /&gt;&lt;BR /&gt;I have tried CATX but couldn't get these results. Any sugestions on how this can be achieved?</description>
      <pubDate>Mon, 24 Sep 2018 07:34:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Concatenate-data-in-multiple-rows/m-p/498299#M15513</guid>
      <dc:creator>Sasforme</dc:creator>
      <dc:date>2018-09-24T07:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate data in multiple rows</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Concatenate-data-in-multiple-rows/m-p/498309#M15514</link>
      <description>&lt;P&gt;Please post test data in the form of a datastep in future, as such this is untested:&lt;/P&gt;
&lt;PRE&gt;data want;
  set have;
  length full $2000;
  retain full;
  by id;
  full=ifc(first.id,full,catx(",",full,block_street_name);
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Sep 2018 07:48:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Concatenate-data-in-multiple-rows/m-p/498309#M15514</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-09-24T07:48:32Z</dc:date>
    </item>
  </channel>
</rss>

