<?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 ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error-expecting-one-of-the-following-amp-lt/m-p/333077#M22153</link>
    <description>&lt;P&gt;I am trying to figure out what I am doing wrong when trying to add a comment. Here is the code i am running..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data tour1;&lt;BR /&gt;input Country $ 1-11 Nights AirCost LandCost Vendor $;&lt;BR /&gt;totalCost= airCost + landCost;&lt;BR /&gt;peakAir= ( airCost * 1.10) + 8;&lt;BR /&gt;nightCost= landCost / nights;&lt;/P&gt;&lt;P&gt;if country = 'Greece' then NewtotalCost = (totalCost * 0.02) + 748 and comment 'sell out fast';&lt;BR /&gt;cards;&lt;BR /&gt;Japan 8 982 1020 Express&lt;BR /&gt;Greece 12 585 748 Express&lt;BR /&gt;New Zealand 16 1368 1539 Southsea&lt;BR /&gt;Ireland 7 787 628 Express&lt;BR /&gt;Venezuela 9 426 505 Mundial&lt;BR /&gt;Italy 8 852 598 Express&lt;BR /&gt;Russia 14 1106 1024 A-B-C&lt;BR /&gt;Switzerland 9 816 834 Tour2000&lt;BR /&gt;Australia 12 1299 1169 Southsea&lt;BR /&gt;Brazil 8 682 610 Almeida&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=tour1;&lt;BR /&gt;title 'MAD Echo Print Tour Data';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and here is the error message I am receiving.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;22&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;,&lt;BR /&gt;=, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT, LE, LT, MAX, MIN, NE, NG, NL, OR, ^=, |, ||, ~=.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Feb 2017 16:43:29 GMT</pubDate>
    <dc:creator>kvera40</dc:creator>
    <dc:date>2017-02-15T16:43:29Z</dc:date>
    <item>
      <title>ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;, *, **, +, -, /, &lt;, &lt;=, &lt;&gt;,</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error-expecting-one-of-the-following-amp-lt/m-p/333077#M22153</link>
      <description>&lt;P&gt;I am trying to figure out what I am doing wrong when trying to add a comment. Here is the code i am running..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data tour1;&lt;BR /&gt;input Country $ 1-11 Nights AirCost LandCost Vendor $;&lt;BR /&gt;totalCost= airCost + landCost;&lt;BR /&gt;peakAir= ( airCost * 1.10) + 8;&lt;BR /&gt;nightCost= landCost / nights;&lt;/P&gt;&lt;P&gt;if country = 'Greece' then NewtotalCost = (totalCost * 0.02) + 748 and comment 'sell out fast';&lt;BR /&gt;cards;&lt;BR /&gt;Japan 8 982 1020 Express&lt;BR /&gt;Greece 12 585 748 Express&lt;BR /&gt;New Zealand 16 1368 1539 Southsea&lt;BR /&gt;Ireland 7 787 628 Express&lt;BR /&gt;Venezuela 9 426 505 Mundial&lt;BR /&gt;Italy 8 852 598 Express&lt;BR /&gt;Russia 14 1106 1024 A-B-C&lt;BR /&gt;Switzerland 9 816 834 Tour2000&lt;BR /&gt;Australia 12 1299 1169 Southsea&lt;BR /&gt;Brazil 8 682 610 Almeida&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=tour1;&lt;BR /&gt;title 'MAD Echo Print Tour Data';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and here is the error message I am receiving.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;22&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;,&lt;BR /&gt;=, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT, LE, LT, MAX, MIN, NE, NG, NL, OR, ^=, |, ||, ~=.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 16:43:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error-expecting-one-of-the-following-amp-lt/m-p/333077#M22153</guid>
      <dc:creator>kvera40</dc:creator>
      <dc:date>2017-02-15T16:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;, *, **, +, -, /, &lt;,</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error-expecting-one-of-the-following-amp-lt/m-p/333080#M22154</link>
      <description>&lt;P&gt;It appears you need to change&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if country = 'Greece' then NewtotalCost = (totalCost * 0.02) + 748 and comment 'sell out fast';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if country = 'Greece' then do;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NewtotalCost = (totalCost * 0.02) + 748;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;comment='sell out fast';&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In an "if ...&amp;nbsp; then ..." statement the &lt;EM&gt;&lt;STRONG&gt;then clause&lt;/STRONG&gt;&lt;/EM&gt; can only be a single action.&amp;nbsp; You wanted multiple actions, so the then clause needs to start a &lt;EM&gt;&lt;STRONG&gt;do group&lt;/STRONG&gt;&lt;/EM&gt; which contains the multiple desired actions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Editted addition.&amp;nbsp; The error message might be a bit misleading&amp;nbsp;because, for syntax purposes, the comment variable was expected to be followed by an operator, as in:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if country = 'Greece' then NewtotalCost = (totalCost * 0.02) + 748 and comment &lt;FONT color="#ff0000"&gt;&lt;STRONG&gt;=&lt;/STRONG&gt; &lt;/FONT&gt;'sell out fast';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But that would have made the then-clause into a logical expression, testing the "truth" of these two expressions:&lt;/P&gt;
&lt;P&gt;&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; (totalcost* 0.02+748)&lt;/P&gt;
&lt;P&gt;&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; and&lt;/P&gt;
&lt;P&gt;&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; (comment='sell out fast')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If both of those expressions were non-zero, then newtotalcost would = 1.&amp;nbsp;&amp;nbsp;&amp;nbsp;But it wouldn't have anything to do with your apparent intentions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 16:55:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error-expecting-one-of-the-following-amp-lt/m-p/333080#M22154</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-02-15T16:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;, *, **, +, -, /, &lt;,</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error-expecting-one-of-the-following-amp-lt/m-p/333110#M22156</link>
      <description>&lt;P&gt;For future reference, it is preferable to copy code with the error message from LOG and paste into a code box opened with the forum {i} icon. The log often contains information in the form of an underscore as to the location of the reported error. If you paste the log results into a code box then the formatting from the log is retained and the underscore appears in the correct relative position. Also including the code from log reduces likelihood of pasting code other than&amp;nbsp;was actually run to generate the error.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 21:37:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error-expecting-one-of-the-following-amp-lt/m-p/333110#M22156</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-02-15T21:37:00Z</dc:date>
    </item>
  </channel>
</rss>

