<?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: CALCULATIONS IN SAS in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/CALCULATIONS-IN-SAS/m-p/539268#M7037</link>
    <description>&lt;P&gt;Please post a minimal working example&lt;/P&gt;</description>
    <pubDate>Thu, 28 Feb 2019 12:46:19 GMT</pubDate>
    <dc:creator>rudfaden</dc:creator>
    <dc:date>2019-02-28T12:46:19Z</dc:date>
    <item>
      <title>CALCULATIONS IN SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CALCULATIONS-IN-SAS/m-p/539090#M7022</link>
      <description>&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;I am trying to run the following case statement in SAS&amp;nbsp; but keep getting an error:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CASE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;WHEN&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ((MM,&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;EOY.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) - (MM,Start_Date)) &amp;gt; Term_Length__months_ &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;THEN&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;'Term_Length__months_'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;ELSE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ((MM,&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;EOY.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) - (MM,Start_Date)) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;END&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Flow_Months_2019&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CASE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;WHEN&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ((MM,&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;EOY.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) - (MM,Start_Date)) &amp;gt; Term_Length__months_ &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;THEN&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;'0'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;ELSE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Term_Length__months_ - ((MM,&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;EOY.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) - (MM,Start_Date)) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;END&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Flow_Months_Contract&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR 79-322: Expecting a (.&lt;/P&gt;&lt;P&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, EQ, EQT,&lt;/P&gt;&lt;P&gt;GE, GET, GT, GTT, LE, LET, LT, LTT, NE, NET, NOT, OR, ^, ^=, |, ||, ~, ~=.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2019 19:13:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CALCULATIONS-IN-SAS/m-p/539090#M7022</guid>
      <dc:creator>DSC2010</dc:creator>
      <dc:date>2019-02-27T19:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATIONS IN SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CALCULATIONS-IN-SAS/m-p/539268#M7037</link>
      <description>&lt;P&gt;Please post a minimal working example&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 12:46:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CALCULATIONS-IN-SAS/m-p/539268#M7037</guid>
      <dc:creator>rudfaden</dc:creator>
      <dc:date>2019-02-28T12:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATIONS IN SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CALCULATIONS-IN-SAS/m-p/539273#M7039</link>
      <description>&lt;P&gt;Show us the log of the entire PROC SQL, and the preceding PROC or DATA step, where this error happens. Click on the {i} icon and paste the log into the window that appears — DO NOT SKIP THIS STEP.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 12:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CALCULATIONS-IN-SAS/m-p/539273#M7039</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-02-28T12:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATIONS IN SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CALCULATIONS-IN-SAS/m-p/539357#M7054</link>
      <description>&lt;P&gt;No wonder SAS is confused. Your code looks really strange to me also.&lt;/P&gt;
&lt;P&gt;What does this mean?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;((MM,&amp;amp;EOY.) - (MM,Start_Date)) &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Feb 2019 16:13:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CALCULATIONS-IN-SAS/m-p/539357#M7054</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-02-28T16:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATIONS IN SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/CALCULATIONS-IN-SAS/m-p/539396#M7061</link>
      <description>&lt;P&gt;Making a complete guess that&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;(MM,&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;EOY.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;)is intended to do something like calculate the number of months(??) from a given value to "end of year" then the actual calculation is missing. In MM and &amp;amp;EOY. are supposed to be date values then perhaps you are missing a function like INTCK.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;If the values are NOT SAS date values then you need to provide:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;values of MM, &amp;amp;EOY. and START_date and make sure we can tell whether the values are character or numeric.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;If the values ARE supposed to&amp;nbsp; be SAS date values then you need to tell us what this is supposed to actual do as the likely functions involved, INTCK or possibly INTNX, require an INTERVAL, such as 'month' to use.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 17:24:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/CALCULATIONS-IN-SAS/m-p/539396#M7061</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-02-28T17:24:36Z</dc:date>
    </item>
  </channel>
</rss>

