<?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: Group by a variable and concatenate another variable in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123931#M34073</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just decare it before you declare source.&amp;nbsp; e.g.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data want (drop=date source_in);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; set have (rename=(source=source_in));&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; retain elements source;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; by name notsorted;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; if first.name then do;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; source=cat(strip(source_in),' - ',strip(date));&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elements=1;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; else do;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; source=cat(strip(source),', ',strip(source_in),' - ',strip(date));&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elements+1;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; if last.name then output;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Feb 2013 18:54:08 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2013-02-28T18:54:08Z</dc:date>
    <item>
      <title>Group by a variable and concatenate another variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123923#M34065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say I have the following table :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; WIDTH: 100%; BORDER-TOP: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Source&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Bob&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2012-01-01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;test1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Bob&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2012-01-02&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;test1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Bob&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2012-01-03&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;test2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Alex&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2012-02-02&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;test5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Alex&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2012-02-03&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;test5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the SAS procedure to obtain the following table :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; WIDTH: 100%; BORDER-TOP: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Source&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Bob&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;test1 - 2012-01-01, test1 - 2012-01-02, test2 - 2012-01-03&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Alex&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;test5 - 2012-02-02, test5 2012-02-03&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be more specific, I want to concatenate source &amp;amp; " - " &amp;amp; date and for each concatenated sources and date, I want to separate them with ", ".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this something that can be done in SAS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help and time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 15:38:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123923#M34065</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2013-02-28T15:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Group by a variable and concatenate another variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123924#M34066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As long as your data are already grouped by name, I think that the following does what you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input Name $ Date yymmdd10. Source $;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;Bob 2012-01-01 test1&lt;/P&gt;&lt;P&gt;Bob 2012-01-02 test1&lt;/P&gt;&lt;P&gt;Bob 2012-01-03 test2&lt;/P&gt;&lt;P&gt;Alex 2012-02-02 test5&lt;/P&gt;&lt;P&gt;Alex 2012-02-03 test5&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=source_in);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have (rename=(source=source_in));&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain source;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by name notsorted;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if first.name then source=cat(strip(source_in),' - ',put(date,yymmdd10.));&lt;/P&gt;&lt;P&gt;&amp;nbsp; else source=cat(strip(source),', ',strip(source_in),' - ',put(date,yymmdd10.));&lt;/P&gt;&lt;P&gt;&amp;nbsp; if last.name then output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 15:53:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123924#M34066</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-02-28T15:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Group by a variable and concatenate another variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123925#M34067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for your quick reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to clarify, when you say as long as my data is already grouped by name did you mean sorted by name?&lt;/P&gt;&lt;P&gt;Also, I think the date in my real table is not formated properly because I get the following error in the put statement :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Format $YYMMDD was not found or could not be loaded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I fix this error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help and time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 16:10:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123925#M34067</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2013-02-28T16:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Group by a variable and concatenate another variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123926#M34068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your example data wasn't sorted by name, but the records for each name were next to each other and already in the order that you indicated you wanted to end up with.&amp;nbsp; The 'by name notsorted' statement, in the code I suggested, would work if you're actual data were similarly ordered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are getting the error because your date field is apparently a character field rather than a SAS date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that is the case, in the two lines where I used "&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;put(date,yymmdd10.)&lt;/SPAN&gt;", simply change them to "strip(date)". i.e.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data want (drop=source_in);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; set have (rename=(source=source_in));&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; retain source;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; by name notsorted;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; if first.name then source=cat(strip(source_in),' - ',strip(date));&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; else source=cat(strip(source),', ',strip(source_in),' - ',strip(date));&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; if last.name then output;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 16:17:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123926#M34068</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-02-28T16:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Group by a variable and concatenate another variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123927#M34069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for the explanation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works perfectly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 17:44:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123927#M34069</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2013-02-28T17:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Group by a variable and concatenate another variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123928#M34070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One last thing, how do I add the numbre of elements in variable source?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 18:10:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123928#M34070</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2013-02-28T18:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Group by a variable and concatenate another variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123929#M34071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input Name $ Date $10. Source $;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;Bob 2012-01-01 test1&lt;/P&gt;&lt;P&gt;Bob 2012-01-02 test1&lt;/P&gt;&lt;P&gt;Bob 2012-01-03 test2&lt;/P&gt;&lt;P&gt;Alex 2012-02-02 test5&lt;/P&gt;&lt;P&gt;Alex 2012-02-03 test5&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=date source_in);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have (rename=(source=source_in));&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain source;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by name notsorted;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if first.name then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; source=cat(strip(source_in),' - ',strip(date));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elements=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; else do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; source=cat(strip(source),', ',strip(source_in),' - ',strip(date));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elements+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if last.name then output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 18:26:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123929#M34071</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-02-28T18:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Group by a variable and concatenate another variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123930#M34072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much, this works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A last detail, how do I make "elements" column appear as the second column instead of the third column?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 18:47:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123930#M34072</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2013-02-28T18:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Group by a variable and concatenate another variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123931#M34073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just decare it before you declare source.&amp;nbsp; e.g.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data want (drop=date source_in);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; set have (rename=(source=source_in));&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; retain elements source;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; by name notsorted;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; if first.name then do;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; source=cat(strip(source_in),' - ',strip(date));&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elements=1;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; else do;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; source=cat(strip(source),', ',strip(source_in),' - ',strip(date));&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elements+1;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; if last.name then output;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 18:54:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123931#M34073</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-02-28T18:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Group by a variable and concatenate another variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123932#M34074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for your help with this!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 18:57:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Group-by-a-variable-and-concatenate-another-variable/m-p/123932#M34074</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2013-02-28T18:57:00Z</dc:date>
    </item>
  </channel>
</rss>

