<?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: ERROR 79-322:Expecting a ( in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512553#M138073</link>
    <description>A parenthesised list following SUM= on the OUTPUT statement  of PROC MEANS, should have one name per var name on the VAR statement</description>
    <pubDate>Tue, 13 Nov 2018 14:41:29 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2018-11-13T14:41:29Z</dc:date>
    <item>
      <title>ERROR 79-322:Expecting a (</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512525#M138064</link>
      <description>&lt;P&gt;I can not get what exactly "(" should be placed in the codes&lt;/P&gt;&lt;P&gt;How to solve this?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data trans_summary(drop=txn_amt_rmb);
	set trans_list;
		by party_id plus_minus_flag;
		retain sum_rmb;
		if first.plus_minus_flag then sum_rmb=0;
		sum_rmb=(sum_rmb,txn_amt_rmb);
		if last.plus_minus_flag then output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Nov 2018 13:09:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512525#M138064</guid>
      <dc:creator>Geo-</dc:creator>
      <dc:date>2018-11-13T13:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322:Expecting a (</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512526#M138065</link>
      <description>&lt;P&gt;This&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;sum_rmb=(sum_rmb,txn_amt_rmb);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;should have been&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;sum_rmb = sum(sum_rmb,txn_amt_rmb);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Nov 2018 13:21:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512526#M138065</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-11-13T13:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322:Expecting a (</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512527#M138066</link>
      <description>&lt;P&gt;This line:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;sum_rmb&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;sum_rmb&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;txn_amt_rmb&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Does not make sense.&amp;nbsp; A variable cannot hold two parameters.&amp;nbsp; Think your missing sum:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;sum_rmb&lt;SPAN class="token operator"&gt;=sum&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;sum_rmb&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;txn_amt_rmb&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 13:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512527#M138066</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-13T13:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322:Expecting a (</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512537#M138069</link>
      <description>&lt;P&gt;thank you~another little question..how to fix it&lt;/P&gt;&lt;P&gt;ERROR 73-322: expecting =&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=trans_list;
	class party_id plus_minus_flag;
	var txn_amt_rmb;
	output out=trans_summary sum_rmb=sum(txn_amt_rmb);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Nov 2018 14:17:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512537#M138069</guid>
      <dc:creator>Geo-</dc:creator>
      <dc:date>2018-11-13T14:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322:Expecting a (</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512541#M138070</link>
      <description>&lt;P&gt;That is nothing like your first post.&amp;nbsp; Please post examples of the actual question and code in future.&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;summary&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;trans_list&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	&lt;SPAN class="token statement"&gt;class&lt;/SPAN&gt; party_id plus_minus_flag&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	&lt;SPAN class="token keyword"&gt;var&lt;/SPAN&gt; txn_amt_rmb&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	output out&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;trans_summary sum&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;sum_rmb&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Nov 2018 14:21:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512541#M138070</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-13T14:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322:Expecting a (</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512542#M138071</link>
      <description>&lt;P&gt;In the OUTPUT statement, you can't use a SUM function as you are trying to do, the SUM= option will create the sums of whatever variable(S) you have in the VAR statement, and then assign that sum to the variable name after the = sign.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;output out=trans_summary sum=sum_txn_amt_rmb;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Nov 2018 14:22:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512542#M138071</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-11-13T14:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322:Expecting a (</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512553#M138073</link>
      <description>A parenthesised list following SUM= on the OUTPUT statement  of PROC MEANS, should have one name per var name on the VAR statement</description>
      <pubDate>Tue, 13 Nov 2018 14:41:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512553#M138073</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2018-11-13T14:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322:Expecting a (</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512593#M138081</link>
      <description>&lt;P&gt;You reversed things on the OUTPUT statement.&amp;nbsp; The original incorrect version:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;output out&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;trans_summary sum_rmb&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;sum&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;txn_amt_rmb&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Within an OUTPUT statement, you need to reverse the request:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;output out&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;trans_summary &lt;SPAN class="token function"&gt;sum&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;txn_amt_rmb&lt;SPAN class="token punctuation"&gt;)=sum_rmb&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or, since there is only one variable in the VAR statement, simply:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;output out&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;trans_summary sum&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;sum_rmb&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 15:40:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512593#M138081</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-11-13T15:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322:Expecting a (</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512638#M138085</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/184018"&gt;@Geo-&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;thank you~another little question..how to fix it&lt;/P&gt;
&lt;P&gt;ERROR 73-322: expecting =&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=trans_list;
	class party_id plus_minus_flag;
	var txn_amt_rmb;
	output out=trans_summary sum_rmb=sum(txn_amt_rmb);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Follow Maxim 1 and read the documentation for the summary procedure. Your mistake will become obvious.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 16:49:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-79-322-Expecting-a/m-p/512638#M138085</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-11-13T16:49:24Z</dc:date>
    </item>
  </channel>
</rss>

