<?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: removing trailing commas from concatenation in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/removing-trailing-commas-from-concatenation/m-p/63212#M17960</link>
    <description>This worked. Thanks!</description>
    <pubDate>Fri, 06 May 2011 18:38:06 GMT</pubDate>
    <dc:creator>lnb001</dc:creator>
    <dc:date>2011-05-06T18:38:06Z</dc:date>
    <item>
      <title>removing trailing commas from concatenation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/removing-trailing-commas-from-concatenation/m-p/63209#M17957</link>
      <description>I am working on a report that requires concatenating multiple records into one field. I first transposed my table and tried to concatenate everything into one column. The problem I encountered is that some observations have only one record of interest while others have as many as eight so when trying to separate each record in the concatenated column I get trailing commas for any cases that have less than eight records. How can I get rid of the trailing commas? Thanks.</description>
      <pubDate>Fri, 06 May 2011 17:28:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/removing-trailing-commas-from-concatenation/m-p/63209#M17957</guid>
      <dc:creator>lnb001</dc:creator>
      <dc:date>2011-05-06T17:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: removing trailing commas from concatenation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/removing-trailing-commas-from-concatenation/m-p/63210#M17958</link>
      <description>CATX should help.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc sort data=sashelp.class out=_data_;&lt;BR /&gt;
   by age;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc transpose;&lt;BR /&gt;
   by age;&lt;BR /&gt;
   var weight;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print;&lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;B&gt;options missing=' ';&lt;/B&gt;&lt;BR /&gt;
data;&lt;BR /&gt;
   set;&lt;BR /&gt;
   length w $64;&lt;BR /&gt;
  &lt;B&gt; w = catX(', ',of col:);&lt;/B&gt;&lt;BR /&gt;
   drop col:;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print;&lt;BR /&gt;
   run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 06 May 2011 17:42:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/removing-trailing-commas-from-concatenation/m-p/63210#M17958</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-05-06T17:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: removing trailing commas from concatenation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/removing-trailing-commas-from-concatenation/m-p/63211#M17959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use &lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a002257076.htm"&gt;CATX &lt;/A&gt; function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 9pt; font-family: Courier New;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Courier New; font-size: 9pt;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp; a = &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: Courier New; font-size: 9pt;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 9pt;"&gt;; b = &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: Courier New; font-size: 9pt;"&gt;"b"&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp; ab = catx(&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: Courier New; font-size: 9pt;"&gt;","&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 9pt;"&gt;,a,b);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Courier New; font-size: 9pt;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 9pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Courier New; font-size: 9pt;"&gt;_all_&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 9pt;"&gt;) (=);&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG style="color: #000080; font-size: 9pt; font-family: Courier New;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: Courier New; font-size: 9pt;"&gt;/* on log&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: Courier New; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp; a=&amp;nbsp; b=b ab=b&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: Courier New; font-size: 9pt;"&gt;*/&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 17:45:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/removing-trailing-commas-from-concatenation/m-p/63211#M17959</guid>
      <dc:creator>chang_y_chung_hotmail_com</dc:creator>
      <dc:date>2011-05-06T17:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: removing trailing commas from concatenation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/removing-trailing-commas-from-concatenation/m-p/63212#M17960</link>
      <description>This worked. Thanks!</description>
      <pubDate>Fri, 06 May 2011 18:38:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/removing-trailing-commas-from-concatenation/m-p/63212#M17960</guid>
      <dc:creator>lnb001</dc:creator>
      <dc:date>2011-05-06T18:38:06Z</dc:date>
    </item>
  </channel>
</rss>

