<?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: Summarizing character variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Summarizing-character-variables/m-p/43395#M8895</link>
    <description>Thanks it worked.</description>
    <pubDate>Wed, 20 Jan 2010 10:30:30 GMT</pubDate>
    <dc:creator>SASACC</dc:creator>
    <dc:date>2010-01-20T10:30:30Z</dc:date>
    <item>
      <title>Summarizing character variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summarizing-character-variables/m-p/43393#M8893</link>
      <description>Pls help me summarising Character Variables.&lt;BR /&gt;
&lt;BR /&gt;
I have a table as below :&lt;BR /&gt;
&lt;BR /&gt;
CON	RANK&lt;BR /&gt;
INS1	1&lt;BR /&gt;
INS2	1&lt;BR /&gt;
INS3	2&lt;BR /&gt;
INS5	2&lt;BR /&gt;
ALC	2&lt;BR /&gt;
RET	3&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I want new table group by Rank.&lt;BR /&gt;
&lt;BR /&gt;
i.e. &lt;BR /&gt;
&lt;BR /&gt;
CON	                                                           Rank&lt;BR /&gt;
INS1/INS2                                                   	1&lt;BR /&gt;
INS3/INS5/ALC	                                                2&lt;BR /&gt;
RET	                                                                 3&lt;BR /&gt;
&lt;BR /&gt;
I used First.  And last. In that case I am missing the middle Value.</description>
      <pubDate>Wed, 20 Jan 2010 07:46:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summarizing-character-variables/m-p/43393#M8893</guid>
      <dc:creator>SASACC</dc:creator>
      <dc:date>2010-01-20T07:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Summarizing character variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summarizing-character-variables/m-p/43394#M8894</link>
      <description>Hi.&lt;BR /&gt;
&lt;BR /&gt;
You must be using FIRST/LAST the wrong way.&lt;BR /&gt;
[pre]&lt;BR /&gt;
data OUTDATA;&lt;BR /&gt;
length CON $200; * allocate new var;&lt;BR /&gt;
set INDATA (rename=(CON=_CON)); * rename old var;&lt;BR /&gt;
by RANK;&lt;BR /&gt;
retain CON; &lt;BR /&gt;
drop _:;&lt;BR /&gt;
if first.RANK then CON=_CON; * reset at the beginning of the group;&lt;BR /&gt;
else CON=catx('/',CON,_CON); * concatenate;&lt;BR /&gt;
if last.RANK; * output at the end;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Cheers from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos @ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
      <pubDate>Wed, 20 Jan 2010 08:59:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summarizing-character-variables/m-p/43394#M8894</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2010-01-20T08:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Summarizing character variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summarizing-character-variables/m-p/43395#M8895</link>
      <description>Thanks it worked.</description>
      <pubDate>Wed, 20 Jan 2010 10:30:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summarizing-character-variables/m-p/43395#M8895</guid>
      <dc:creator>SASACC</dc:creator>
      <dc:date>2010-01-20T10:30:30Z</dc:date>
    </item>
  </channel>
</rss>

