<?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 message ERROR 180-322: Statement is not valid or it is used out of proper order. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Syntax-error-trying-to-call-a-macro-with-parameter/m-p/372089#M24268</link>
    <description>&lt;P&gt;Compare the macro signature:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macrobound"&gt;%macro&lt;/SPAN&gt; survey&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;With the way you are calling it:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macroname"&gt;%survey&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;2011&lt;/SPAN&gt;&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;There is a difference.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Jun 2017 10:21:20 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-06-30T10:21:20Z</dc:date>
    <item>
      <title>Syntax error trying to call a macro with parameter</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Syntax-error-trying-to-call-a-macro-with-parameter/m-p/372086#M24266</link>
      <description>&lt;P&gt;Folks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm getting the following error 180-322 when I'm running this Macro. From reading online it appears the most logical reason is that I'm missing a semi colon. however, from looking at my code I can't seem to see what the error is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I'm creating a new dataset which stacks two datasets on top of each other and then aggregates two variables to create a new variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It appears to do it, but I get this every year.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be most welcome.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro survey;
%do year = 2011 %to 2015;
data combine_&amp;amp;year.;
set mywork.combined_sample_&amp;amp;year._5 survey18plus_&amp;amp;year.;
totalincome=sum(of nat_totinc_admin_personal,indoincome);
Dispinc=sum(of nat_dispinc_admin_personal,indodisp);
run;

%end;


%mend;
%survey (2011);
%survey (2012);
%survey (2013);
%survey (2014);
%survey (2015);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;36         %survey (2014);
                   _
                   180
ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 12:53:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Syntax-error-trying-to-call-a-macro-with-parameter/m-p/372086#M24266</guid>
      <dc:creator>Sean_OConnor</dc:creator>
      <dc:date>2017-06-30T12:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error message ERROR 180-322: Statement is not valid or it is used out of proper order.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Syntax-error-trying-to-call-a-macro-with-parameter/m-p/372087#M24267</link>
      <description>&lt;P&gt;The macro is built to process all 5 years. &amp;nbsp;Just call it once and stop trying to tell the macro what year to use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%survey&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 10:13:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Syntax-error-trying-to-call-a-macro-with-parameter/m-p/372087#M24267</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-06-30T10:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Error message ERROR 180-322: Statement is not valid or it is used out of proper order.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Syntax-error-trying-to-call-a-macro-with-parameter/m-p/372089#M24268</link>
      <description>&lt;P&gt;Compare the macro signature:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macrobound"&gt;%macro&lt;/SPAN&gt; survey&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;With the way you are calling it:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macroname"&gt;%survey&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;2011&lt;/SPAN&gt;&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;There is a difference.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 10:21:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Syntax-error-trying-to-call-a-macro-with-parameter/m-p/372089#M24268</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-06-30T10:21:20Z</dc:date>
    </item>
  </channel>
</rss>

