<?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 180-322: Statement is not valid or it is used out of proper order. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/204003#M37990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. But I didn't find any semi-colons missing. Anyways, it worked when I removed my comments line before this proc sql.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2015 02:32:41 GMT</pubDate>
    <dc:creator>Xiuchen</dc:creator>
    <dc:date>2015-03-18T02:32:41Z</dc:date>
    <item>
      <title>ERROR 180-322: Statement is not valid or it is used out of proper order.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/203999#M37986</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I got the error message below surprisingly. I don't understand why it says statement is not valid. This proc sql is imbedded in a macro and if I run it individually, it is working. I even tried to use data step in replace of proc sql but it still says "statement is not valid". Hope some one can help me out. TX!&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc sql; create table normssp as select * from tmp where nss_norm = "&amp;amp;asso" and spx_test_name = "&amp;amp;sub" and
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 180
13&amp;nbsp; ! nss_grade = "&amp;amp;grad"; quit;&amp;nbsp;&amp;nbsp;
ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 12:07:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/203999#M37986</guid>
      <dc:creator>Xiuchen</dc:creator>
      <dc:date>2016-08-26T12:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 180-322: Statement is not valid or it is used out of proper order.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/204000#M37987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you have answered your own question as you say it doesn't work inside your macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to post your complete program with the surrounding macro code before we can help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2015 21:30:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/204000#M37987</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-03-17T21:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 180-322: Statement is not valid or it is used out of proper order.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/204001#M37988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are missing a semi-colon somewhere before the PROC SQL; statement.&amp;nbsp; So the CREATE STATEMENT is invalid since you did not start PROC SQL first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 00:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/204001#M37988</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-03-18T00:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 180-322: Statement is not valid or it is used out of proper order.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/204002#M37989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well caught, Tom.&lt;/P&gt;&lt;P&gt;Viewing the snippet of the log in a monospace font makes it easier to understand where the error is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 01:30:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/204002#M37989</guid>
      <dc:creator>dkb</dc:creator>
      <dc:date>2015-03-18T01:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 180-322: Statement is not valid or it is used out of proper order.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/204003#M37990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. But I didn't find any semi-colons missing. Anyways, it worked when I removed my comments line before this proc sql.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 02:32:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/204003#M37990</guid>
      <dc:creator>Xiuchen</dc:creator>
      <dc:date>2015-03-18T02:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 180-322: Statement is not valid or it is used out of proper order.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/204004#M37991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds as though your missing semi-colon was on the comment line.&amp;nbsp; Remember if you begin a line with an asterisk, not only is that line a comment, so is everything between the asterisk and the next semi-colon that SAS finds, even if it's several lines later.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 02:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/204004#M37991</guid>
      <dc:creator>dkb</dc:creator>
      <dc:date>2015-03-18T02:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 180-322: Statement is not valid or it is used out of proper order.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/294361#M61408</link>
      <description>&lt;P&gt;Thanks to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom﻿&lt;/a&gt;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi﻿&lt;/a&gt;, and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/44630"&gt;@dkb﻿&lt;/a&gt;&amp;nbsp;for excellent advice -- all deserve credit for solving this. &amp;nbsp;I'm going to close this out by summarizing:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;ERROR 180-322 ... is most&amp;nbsp;often&amp;nbsp;caused by a missing semicolon in the program that you submitted. &amp;nbsp;In this case, perhaps your&amp;nbsp;&lt;STRONG&gt;proc sql&lt;/STRONG&gt; line was interpreted as part of a previous comment line, so the&amp;nbsp;&lt;STRONG&gt;create table&lt;/STRONG&gt; statement was "out of order".&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Code generated by a SAS macro, or submitted with a "submit selected" operation in your editor, can leave off a semicolon inadvertently -- that's not always easy to find. &amp;nbsp;So examine not just the code that you see in your program editor, but consider what was actually submitted to SAS when the error was produced.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;For more some fun information about this common syntax error message, see this blog post: &lt;A href="http://blogs.sas.com/content/sasdummy/2016/08/25/error-180-322-missing-semicolon/" target="_self"&gt;ERROR 180-322: The story of an error message&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 29 Aug 2016 15:35:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/294361#M61408</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-08-29T15:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 180-322: Statement is not valid or it is used out of proper order.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/334719#M75604</link>
      <description>My code also had the same issue. It worked when I removed comments after reading this. Thanks</description>
      <pubDate>Tue, 21 Feb 2017 17:15:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/334719#M75604</guid>
      <dc:creator>arunnethi123</dc:creator>
      <dc:date>2017-02-21T17:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 180-322: Statement is not valid or it is used out of proper order.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/346009#M79704</link>
      <description>&lt;P&gt;Thanks , this solves my issue too &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2017 02:20:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/346009#M79704</guid>
      <dc:creator>Sandipana</dc:creator>
      <dc:date>2017-03-31T02:20:08Z</dc:date>
    </item>
  </channel>
</rss>

