<?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: help with syntax error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781121#M248950</link>
    <description>&lt;P&gt;And when you post logs, use this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 715px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This will keep the horizontal position of markers.&lt;/P&gt;
&lt;P&gt;The "little running man" next to it is for SAS code, it provides coloring similar to the Enhanced Editor.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Nov 2021 20:28:33 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-11-18T20:28:33Z</dc:date>
    <item>
      <title>help with syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781079#M248924</link>
      <description>&lt;P&gt;Can someone look at this portion of my code below; I'm getting the following errors. I have been at this all morning and cannot get the code to run. Thank you in advance for any advice&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lisa_Sessions_0-1637256928148.png" style="width: 498px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65881i60B4BDCD76A259F0/image-dimensions/498x102?v=v2" width="498" height="102" role="button" title="Lisa_Sessions_0-1637256928148.png" alt="Lisa_Sessions_0-1637256928148.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;intck('month', input('Appointment Effective Date'n, anydtdte10.), input('Appointment Expiration Date'n, anydtdte10.)) as month_dif,&lt;BR /&gt;case&lt;BR /&gt;when calculated month_dif lt 36 then "Presumed Correct"&lt;BR /&gt;when calculated month_dif ge 37 then "Create New Start Date"&lt;BR /&gt;end as 'new_start_dt_id_1'n,&lt;BR /&gt;case&lt;BR /&gt;when calculated month_dif ge 37 then intnx('month', 'Appointment Expiration Date'n, -24, 's')&lt;BR /&gt;end as 'new_start_dt'n format=date9.,&lt;BR /&gt;case&lt;BR /&gt;when calculated 'new_start_dt'n ge today() then "Unknown"&lt;BR /&gt;else "" end as 'future_dt_id'n&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 17:37:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781079#M248924</guid>
      <dc:creator>LMSSAS</dc:creator>
      <dc:date>2021-11-18T17:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: help with syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781085#M248925</link>
      <description>Can you show the actual log instead of just the error screenshot?&lt;BR /&gt;The log is usually more informative. &lt;BR /&gt;&lt;BR /&gt;Also, please include the whole query, not just the portion.</description>
      <pubDate>Thu, 18 Nov 2021 17:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781085#M248925</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-18T17:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: help with syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781088#M248926</link>
      <description>Reeza - Thank you for the response. This is my first time posting in the SAS community and am not sure what is too much and not enough. Below the Log I also posted the full query&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;36 create table Inactive_DFS as&lt;BR /&gt;37 Select&lt;BR /&gt;38 'Licensee Name'n,&lt;BR /&gt;39 'License Number'n,&lt;BR /&gt;40 input('Appointment Effective Date'n, anydtdte10.) AS 'Appointment Effective Date'n FORMAT=DATE9.,&lt;BR /&gt;41 input('Appointment Expiration Date'n, anydtdte10.) AS 'Appointment Expiration Date'n FORMAT=DATE9.,&lt;BR /&gt;42 input('Appointment Status Date'n, anydtdte10.) AS 'Appointment Status Date'n FORMAT=DATE9.,&lt;BR /&gt;43 'Appointing Entity Number'n,&lt;BR /&gt;44 'Appointment TYCL number'n,&lt;BR /&gt;45 NPN Number,&lt;BR /&gt;______&lt;BR /&gt;22&lt;BR /&gt;46 intck('month', input('Appointment Effective Date'n, anydtdte10.), input('Appointment Expiration Date'n, anydtdte10.))&lt;BR /&gt;_ _ _&lt;BR /&gt;79 79 79&lt;BR /&gt;200 200&lt;BR /&gt;46 ! as month_dif,&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, (, *, **, +, ',', -, '.', /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, AS,&lt;BR /&gt;CONTAINS, EQ, EQT, FROM, GE, GET, GT, GTT, LE, LET, LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=.&lt;BR /&gt;&lt;BR /&gt;ERROR 79-322: Expecting a ).&lt;BR /&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;BR /&gt;&lt;BR /&gt;47&lt;BR /&gt;48 case&lt;BR /&gt;49 when calculated month_dif lt 36 then "Presumed Correct"&lt;BR /&gt;____&lt;BR /&gt;22&lt;BR /&gt;76&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, ',', '.', ANSIMISS, AS, CROSS, EXCEPT, FULL, GROUP,&lt;BR /&gt;HAVING, INNER, INTERSECT, JOIN, LEFT, NATURAL, NOMISS, ORDER, OUTER, RIGHT, UNION, WHERE.&lt;BR /&gt;&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;&lt;BR /&gt;50 when calculated month_dif ge 37 then "Create New Start Date"&lt;BR /&gt;51 end as 'new_start_dt_id_1'n,&lt;BR /&gt;52 case&lt;BR /&gt;53 when calculated month_dif ge 37 then intnx('month', 'Appointment Expiration Date'n, -24, 's')&lt;BR /&gt;54 end as 'new_start_dt'n format=date9.,&lt;BR /&gt;55 case&lt;BR /&gt;56 when calculated 'new_start_dt'n ge today() then "Unknown"&lt;BR /&gt;57 else "" end as 'future_dt_id'n&lt;BR /&gt;58&lt;BR /&gt;59 From INACTIVE_06020_05687_87022_33461&lt;BR /&gt;60 where NPN Number in (&amp;amp;NATL_PDCR_NB.)&lt;BR /&gt;61 ;&lt;BR /&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;62 Quit;&lt;BR /&gt;NOTE: The SAS System stopped processing this step b&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table Inactive_DFS as&lt;BR /&gt;Select&lt;BR /&gt;'Licensee Name'n,&lt;BR /&gt;'License Number'n,&lt;BR /&gt;input('Appointment Effective Date'n, anydtdte10.) AS 'Appointment Effective Date'n FORMAT=DATE9.,&lt;BR /&gt;input('Appointment Expiration Date'n, anydtdte10.) AS 'Appointment Expiration Date'n FORMAT=DATE9.,&lt;BR /&gt;input('Appointment Status Date'n, anydtdte10.) AS 'Appointment Status Date'n FORMAT=DATE9.,&lt;BR /&gt;'Appointing Entity Number'n,&lt;BR /&gt;'Appointment TYCL number'n,&lt;BR /&gt;NPN Number,&lt;BR /&gt;intck('month', input('Appointment Effective Date'n, anydtdte10.), input('Appointment Expiration Date'n, anydtdte10.)) as month_dif,&lt;BR /&gt;case&lt;BR /&gt;when calculated month_dif lt 36 then "Presumed Correct"&lt;BR /&gt;when calculated month_dif ge 37 then "Create New Start Date"&lt;BR /&gt;end as 'new_start_dt_id_1'n,&lt;BR /&gt;case&lt;BR /&gt;when calculated month_dif ge 37 then intnx('month', 'Appointment Expiration Date'n, -24, 's')&lt;BR /&gt;end as 'new_start_dt'n format=date9.,&lt;BR /&gt;case&lt;BR /&gt;when calculated 'new_start_dt'n ge today() then "Unknown"&lt;BR /&gt;else "" end as 'future_dt_id'n&lt;BR /&gt;&lt;BR /&gt;From INACTIVE_06020_05687_87022_33461&lt;BR /&gt;where NPN Number in (&amp;amp;NATL_PDCR_NB.)&lt;BR /&gt;;&lt;BR /&gt;Quit;</description>
      <pubDate>Thu, 18 Nov 2021 18:02:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781088#M248926</guid>
      <dc:creator>LMSSAS</dc:creator>
      <dc:date>2021-11-18T18:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: help with syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781089#M248927</link>
      <description>&lt;P&gt;NPN Number needs the quotes and N as well, ie&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;'NPN Number'n&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;EDIT: note this is in more than one place in your code so you need to fix all of them.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 18:15:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781089#M248927</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-18T18:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: help with syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781091#M248928</link>
      <description>And just a last note, if you're working with an imported file, it's a good idea to set the following options so that you don't have spaces in the names. It makes life easier.&lt;BR /&gt;&lt;BR /&gt;option validvarname=v7;&lt;BR /&gt;&lt;BR /&gt;The default in Studio is Any which allows spaces in names but makes it a pain to work with.</description>
      <pubDate>Thu, 18 Nov 2021 18:18:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781091#M248928</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-18T18:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: help with syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781092#M248929</link>
      <description>Thank you, I appreciate it. When I make your suggested change, I get the following errors all referencing the below where staement: I went through the intck statement and changed the 'lt' and 'ge' to &amp;lt; or &amp;gt; and still get the same error. DO you have any recommendation for this?&lt;BR /&gt;&lt;BR /&gt;where 'NPN Number'n in (&amp;amp;NATL_PDCR_NB.)&lt;BR /&gt;&lt;BR /&gt;ERROR: Function INTNX requires a numeric expression as argument 2.&lt;BR /&gt;ERROR: Character expression requires a character format.&lt;BR /&gt;ERROR: Expression using greater than or equal (&amp;gt;=) has components that are of different data types.</description>
      <pubDate>Thu, 18 Nov 2021 18:22:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781092#M248929</guid>
      <dc:creator>LMSSAS</dc:creator>
      <dc:date>2021-11-18T18:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: help with syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781095#M248930</link>
      <description>Thank you for this!!&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Nov 2021 18:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781095#M248930</guid>
      <dc:creator>LMSSAS</dc:creator>
      <dc:date>2021-11-18T18:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: help with syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781099#M248933</link>
      <description>It was easy to find that first error because SAS underlined it. &lt;BR /&gt;If you post the whole log it makes it very easy to see exactly where the error is. &lt;BR /&gt;&lt;BR /&gt;I suspect it's here:&lt;BR /&gt;when calculated month_dif ge 37 then intnx('month', 'Appointment Expiration Date'n, -24, 's')&lt;BR /&gt;&lt;BR /&gt;You need to convert it as you did in the INTCK calculations or add the key word CALCULATED to use the newly converted variable.&lt;BR /&gt;&lt;BR /&gt;Appointment Expiration date isn't a date as you convert it earlier&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Nov 2021 18:33:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781099#M248933</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-18T18:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: help with syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781100#M248934</link>
      <description>&lt;P&gt;&amp;nbsp;I will make sure moving forward that I copy the log for every new error and question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again for your time today !!!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 18:35:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781100#M248934</guid>
      <dc:creator>LMSSAS</dc:creator>
      <dc:date>2021-11-18T18:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: help with syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781121#M248950</link>
      <description>&lt;P&gt;And when you post logs, use this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 715px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This will keep the horizontal position of markers.&lt;/P&gt;
&lt;P&gt;The "little running man" next to it is for SAS code, it provides coloring similar to the Enhanced Editor.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 20:28:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781121#M248950</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-18T20:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: help with syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781125#M248954</link>
      <description>Thank you, I will use these.&lt;BR /&gt;i appreciate the inforamtion</description>
      <pubDate>Thu, 18 Nov 2021 20:35:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-syntax-error/m-p/781125#M248954</guid>
      <dc:creator>LMSSAS</dc:creator>
      <dc:date>2021-11-18T20:35:01Z</dc:date>
    </item>
  </channel>
</rss>

