<?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: Division by Zero Note to Error in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613098#M18356</link>
    <description>&lt;P&gt;I am more of looking for the program to stop running because of errors. Not just put a new note in the log.&amp;nbsp; Thanks for the thought though.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Dec 2019 16:51:59 GMT</pubDate>
    <dc:creator>jdykstra</dc:creator>
    <dc:date>2019-12-19T16:51:59Z</dc:date>
    <item>
      <title>Division by Zero Note to Error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613094#M18353</link>
      <description>&lt;P&gt;I was curios if i am able to turn the division by zero note to an error. (i.e.&amp;nbsp;NOTE: Division by zero detected at line xx column xx. OR NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to&amp;nbsp;missing values.)&amp;nbsp; For example, I usually use the following options:&amp;nbsp;options varinitchk=error mprint=1 validvarname=v7 missing='' ;&amp;nbsp; where varinitchk=error is the sort of option I am looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 16:31:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613094#M18353</guid>
      <dc:creator>jdykstra</dc:creator>
      <dc:date>2019-12-19T16:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Division by Zero Note to Error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613095#M18354</link>
      <description>&lt;P&gt;If you use divide(a,b) instead of a/b then the case of division by 0 will yield a &lt;STRONG&gt;.I &lt;/STRONG&gt;(special missing value -- .I for Inf, .M for -Inf). You can then flag those instances with a variable "myerror":&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;

ex1=1/0;
put ex1=;

ex2=divide(1,0);
put ex2=;

myerror = (ex2 in (.I .M));
put myerror=;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 17:25:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613095#M18354</guid>
      <dc:creator>unison</dc:creator>
      <dc:date>2019-12-19T17:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Division by Zero Note to Error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613096#M18355</link>
      <description>&lt;P&gt;Maybe NOTE2ERR data statement option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;35         data _null_ / note2err;


NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      
ERROR: Division by zero detected during the compilation phase, detected at line 36 column 9.
NOTE: The SAS System stopped processing this step because of errors.
36            x = 1/0;
37            run;


38         data _null_ / note2err;
39            d = 0;
40            x = 1/d;
41            run;

ERROR: Division by zero detected at line 40 column 9.
ERROR: Termination due to Floating Point Exception
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Dec 2019 16:41:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613096#M18355</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2019-12-19T16:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Division by Zero Note to Error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613098#M18356</link>
      <description>&lt;P&gt;I am more of looking for the program to stop running because of errors. Not just put a new note in the log.&amp;nbsp; Thanks for the thought though.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 16:51:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613098#M18356</guid>
      <dc:creator>jdykstra</dc:creator>
      <dc:date>2019-12-19T16:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Division by Zero Note to Error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613099#M18357</link>
      <description>&lt;P&gt;Is there anyway to apply note2err to a specific note and across all datasets?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 16:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613099#M18357</guid>
      <dc:creator>jdykstra</dc:creator>
      <dc:date>2019-12-19T16:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Division by Zero Note to Error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613105#M18358</link>
      <description>&lt;P&gt;option dsoptions=note2err;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;option dsoptions=note2err;

data _null_;
a=1/0;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 17:24:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613105#M18358</guid>
      <dc:creator>unison</dc:creator>
      <dc:date>2019-12-19T17:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Division by Zero Note to Error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613107#M18359</link>
      <description>&lt;P&gt;You can use the internal option&amp;nbsp;&lt;FONT style="background-color: #ffffff;"&gt; DSOPTIONS=note2err; to apply to all data steps.&amp;nbsp; I don't know if you can make it specific to division by zero.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 17:23:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Division-by-Zero-Note-to-Error/m-p/613107#M18359</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2019-12-19T17:23:36Z</dc:date>
    </item>
  </channel>
</rss>

