<?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: Using PROC FCMP functions as an aggregate function for PROC SQL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-FCMP-functions-as-an-aggregate-function-for-PROC-SQL/m-p/355781#M83337</link>
    <description>&lt;P&gt;Please vote for adding string aggregate functions to SAS/SQL at:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/create-string-summary-functions/idi-p/288035" target="_self"&gt;https://communities.sas.com/t5/SASware-Ballot-Ideas/create-string-summary-functions/idi-p/288035&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 May 2017 20:43:38 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2017-05-03T20:43:38Z</dc:date>
    <item>
      <title>Using PROC FCMP functions as an aggregate function for PROC SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-FCMP-functions-as-an-aggregate-function-for-PROC-SQL/m-p/355713#M83319</link>
      <description>&lt;P&gt;Let's say I have this dateset:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DATA foo;
	input a b $;
	datalines;
1 apple
1 banana
1 orange
2 grape
2 kiwi
3 strawberry
;&lt;BR /&gt;RUN&lt;/PRE&gt;&lt;P&gt;And I want to concatenate b grouping by a using PROC SQL.&amp;nbsp; Maybe something like this:&lt;/P&gt;&lt;PRE&gt;PROC SQL;
	select
		concatenate(b)
	from
		foo
	group by
		a;
QUIT;&lt;/PRE&gt;&lt;P&gt;How would I go about doing that with PROC FCMP?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 18:36:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-FCMP-functions-as-an-aggregate-function-for-PROC-SQL/m-p/355713#M83319</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2017-05-03T18:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC FCMP functions as an aggregate function for PROC SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-FCMP-functions-as-an-aggregate-function-for-PROC-SQL/m-p/355714#M83320</link>
      <description>&lt;P&gt;I'm sure one could torture PROC FCMP enough to create the function that you want.&amp;nbsp; But because you want a function over several observations it will probably be very messy.&amp;nbsp; Given your example, how about this data step, using the CATX function and a "SET ... BY" pair of statements inside a "do until last." loop?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA foo;&lt;BR /&gt; input a b $10.;&lt;BR /&gt; datalines;&lt;BR /&gt;1 apple&lt;BR /&gt;1 banana&lt;BR /&gt;1 orange&lt;BR /&gt;2 grape&lt;BR /&gt;2 kiwi&lt;BR /&gt;3 strawberry&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; do until (last.a);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set foo;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by a;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; length all_b_values $60;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; all_b_values=catx(',',all_b_values,b);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 18:40:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-FCMP-functions-as-an-aggregate-function-for-PROC-SQL/m-p/355714#M83320</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-05-03T18:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC FCMP functions as an aggregate function for PROC SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-FCMP-functions-as-an-aggregate-function-for-PROC-SQL/m-p/355720#M83321</link>
      <description>Not a fan of the data step but it seems unavoidable here. All of the CAT functions don't work as aggregate functions in PROC SQL. Thanks for the reply.</description>
      <pubDate>Wed, 03 May 2017 18:47:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-FCMP-functions-as-an-aggregate-function-for-PROC-SQL/m-p/355720#M83321</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2017-05-03T18:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC FCMP functions as an aggregate function for PROC SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-FCMP-functions-as-an-aggregate-function-for-PROC-SQL/m-p/355781#M83337</link>
      <description>&lt;P&gt;Please vote for adding string aggregate functions to SAS/SQL at:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/create-string-summary-functions/idi-p/288035" target="_self"&gt;https://communities.sas.com/t5/SASware-Ballot-Ideas/create-string-summary-functions/idi-p/288035&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 20:43:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-FCMP-functions-as-an-aggregate-function-for-PROC-SQL/m-p/355781#M83337</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-05-03T20:43:38Z</dc:date>
    </item>
  </channel>
</rss>

