<?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 how to get  a when statement to work with negative numbers in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/how-to-get-a-when-statement-to-work-with-negative-numbers/m-p/201279#M50242</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a HI I have an if statement&lt;/P&gt;&lt;P&gt;data ms;&lt;/P&gt;&lt;P&gt;set ms;&lt;/P&gt;&lt;P&gt;actual = datedif (date,today(), 'act/act');&lt;/P&gt;&lt;P&gt;put actual= ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gets me number&amp;nbsp; of days from date to today date...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data ms;&lt;/P&gt;&lt;P&gt;set ms;&lt;/P&gt;&lt;P&gt;select;&lt;/P&gt;&lt;P&gt;when (actual=.) copy= " ";&lt;/P&gt;&lt;P&gt;when (actual &amp;lt;0 or&amp;nbsp; actual &amp;gt; -15 ) Copy "pre_15";&lt;/P&gt;&lt;P&gt;when ( actual &amp;gt;=1 or actual &amp;lt;=90) copy " post_90";&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;I Want to Id what's within 15 days an that number is&amp;nbsp; a negative reason its a -15...&lt;/P&gt;&lt;P&gt;i Want to ID post 90 days I'm using today date to get the datediff and date. Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: gilbert arredondo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Aug 2015 22:20:30 GMT</pubDate>
    <dc:creator>BETO</dc:creator>
    <dc:date>2015-08-17T22:20:30Z</dc:date>
    <item>
      <title>how to get  a when statement to work with negative numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-get-a-when-statement-to-work-with-negative-numbers/m-p/201279#M50242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a HI I have an if statement&lt;/P&gt;&lt;P&gt;data ms;&lt;/P&gt;&lt;P&gt;set ms;&lt;/P&gt;&lt;P&gt;actual = datedif (date,today(), 'act/act');&lt;/P&gt;&lt;P&gt;put actual= ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gets me number&amp;nbsp; of days from date to today date...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data ms;&lt;/P&gt;&lt;P&gt;set ms;&lt;/P&gt;&lt;P&gt;select;&lt;/P&gt;&lt;P&gt;when (actual=.) copy= " ";&lt;/P&gt;&lt;P&gt;when (actual &amp;lt;0 or&amp;nbsp; actual &amp;gt; -15 ) Copy "pre_15";&lt;/P&gt;&lt;P&gt;when ( actual &amp;gt;=1 or actual &amp;lt;=90) copy " post_90";&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;I Want to Id what's within 15 days an that number is&amp;nbsp; a negative reason its a -15...&lt;/P&gt;&lt;P&gt;i Want to ID post 90 days I'm using today date to get the datediff and date. Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: gilbert arredondo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 22:20:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-get-a-when-statement-to-work-with-negative-numbers/m-p/201279#M50242</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2015-08-17T22:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to get if statement to work with negative numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-get-a-when-statement-to-work-with-negative-numbers/m-p/201280#M50243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1- There is no IF in your code; what with the title?&lt;/P&gt;&lt;P&gt;2- The copy keyword is invalid syntax as used in your code&lt;/P&gt;&lt;P&gt;3- The last sentences make little sense&lt;/P&gt;&lt;P&gt;If you want to be helped the least you can do is present a properly explained and presented case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 23:47:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-get-a-when-statement-to-work-with-negative-numbers/m-p/201280#M50243</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2015-08-17T23:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to get if statement to work with negative numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-get-a-when-statement-to-work-with-negative-numbers/m-p/201281#M50244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it was an if statement I change it before I asked the question....Chris if it doesn't make sense&amp;nbsp; to you need to respond I try to make it as clear as possible &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 02:22:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-get-a-when-statement-to-work-with-negative-numbers/m-p/201281#M50244</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2015-08-18T02:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to get if statement to work with negative numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-get-a-when-statement-to-work-with-negative-numbers/m-p/201282#M50245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need AND not OR In your conditions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As Chris has indicated you need an equal in your assignment statement for the copy variable. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 03:26:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-get-a-when-statement-to-work-with-negative-numbers/m-p/201282#M50245</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-08-18T03:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to get if statement to work with negative numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-get-a-when-statement-to-work-with-negative-numbers/m-p/201283#M50246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Reeza ... I will take your suggestion...It a snippe of code that works for me on other code but it's character not number&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 03:30:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-get-a-when-statement-to-work-with-negative-numbers/m-p/201283#M50246</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2015-08-18T03:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to get if statement to work with negative numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-get-a-when-statement-to-work-with-negative-numbers/m-p/201284#M50247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI reeza&amp;nbsp; &lt;/P&gt;&lt;P&gt;i Got it &lt;/P&gt;&lt;P&gt;data table;&lt;/P&gt;&lt;P&gt;set table;&lt;/P&gt;&lt;P&gt;if actual ge 0 and actual Le 90 then copy = "post_90";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 04:13:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-get-a-when-statement-to-work-with-negative-numbers/m-p/201284#M50247</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2015-08-18T04:13:51Z</dc:date>
    </item>
  </channel>
</rss>

