<?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: Syntax error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error/m-p/496255#M131194</link>
    <description>&lt;P&gt;Clue:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;ERROR &lt;SPAN class="token number"&gt;79&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;-322&lt;/SPAN&gt;: &lt;SPAN class="token number"&gt;Ex&lt;/SPAN&gt;pecting a &lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 17 Sep 2018 14:53:33 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-09-17T14:53:33Z</dc:date>
    <item>
      <title>Syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error/m-p/496229#M131183</link>
      <description>&lt;P&gt;Could you please guide me to overcome this syntax error?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt;input renewal_date $;&lt;BR /&gt;datalines;&lt;BR /&gt;15jun&lt;BR /&gt;11sep&lt;BR /&gt;14sep&lt;BR /&gt;02jan&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data want;&lt;BR /&gt; set have;&lt;BR /&gt; if input(cats(renewal_date,"2018"),date9.) &amp;gt; today()) then new_renewel_date=input(cats(renewel_date,"2019"),date9.);&lt;BR /&gt; else renewel_date=input(cats(renewal_date,"2018"),date9.);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;26         data have;
27         input renewal_date $;
28         datalines;

NOTE: The data set WORK.HAVE has 4 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      
33         ;

34         run;
35         
36         
37         data want;
38           set have;
2                                                          The SAS System                           13:51 Monday, September 17, 2018

39           if input((cats(renewal_date,"2018"),date9.) &amp;gt; today()) then new_renewel_date=input(cats(renewel_date,"2019"),date9.);
                                                _                 _
                                                79                22
                                                                  200
40           else renewel_date=input(cats(renewal_date,"2018"),date9.);
             ____
             160
ERROR 79-322: Expecting a ).

ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, -, /, ;, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT, 
              IN, LE, LT, MAX, MIN, NE, NG, NL, NOT, NOTIN, OR, THEN, ^, ^=, |, ||, ~, ~=.  

ERROR 200-322: The symbol is not recognized and will be ignored.

ERROR 160-185: No matching IF-THEN clause.

41         run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Sep 2018 13:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error/m-p/496229#M131183</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-09-17T13:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error/m-p/496233#M131186</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/8409"&gt;@Babloo&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Unbalance brackets:&lt;/P&gt;
&lt;P&gt;Remove one of the closing brackets after today()&lt;FONT color="#ff0000"&gt;)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 13:28:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error/m-p/496233#M131186</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-09-17T13:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error/m-p/496250#M131192</link>
      <description>&lt;BR /&gt;Place close brackets before &amp;gt; .change if condition to--&lt;BR /&gt;&lt;BR /&gt;if input((cats(renewal_date,"2018"),date9.)) &amp;gt; today() then new_renewel_date=input(cats(renewel_date,"2019"),date9.);&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Sep 2018 14:22:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error/m-p/496250#M131192</guid>
      <dc:creator>Vibcom</dc:creator>
      <dc:date>2018-09-17T14:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error/m-p/496252#M131193</link>
      <description>&lt;P&gt;Also, you have written "renewel" instead of "renewal" at several places.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit : I guess you want&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt; set have;&lt;BR /&gt; if input(cats(renewal_date,"2018"),date9.) &amp;gt; today() then new_renewal_date=input(cats(renewal_date,"2019"),date9.);&lt;BR /&gt; else new_renewal_date=input(cats(renewal_date,"2018"),date9.);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 14:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error/m-p/496252#M131193</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2018-09-17T14:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error/m-p/496255#M131194</link>
      <description>&lt;P&gt;Clue:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;ERROR &lt;SPAN class="token number"&gt;79&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;-322&lt;/SPAN&gt;: &lt;SPAN class="token number"&gt;Ex&lt;/SPAN&gt;pecting a &lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Sep 2018 14:53:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error/m-p/496255#M131194</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-09-17T14:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error/m-p/496280#M131203</link>
      <description>&lt;P&gt;If you are using the Enhanced editor you can find matching ( or not matched parentheses by placing the cursor on either the ( or ) and pressing CTRL 9. If you do so on the "input(" ( then you will find that the matching ) is after the today(). In other words the INPUT is being told to include "&amp;gt; today()" in some form. You likely meant there to be a ( before input to go along with the IF.&lt;/P&gt;
&lt;PRE&gt;if (input(cats(renewal_date,"2018"),date9.) &amp;gt; today())
&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Sep 2018 15:51:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error/m-p/496280#M131203</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-17T15:51:55Z</dc:date>
    </item>
  </channel>
</rss>

