<?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: Divide two variables and get dot (.) in the result of the query in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748793#M235205</link>
    <description>&lt;P&gt;Yes, division by zero results in a missing value.&amp;nbsp; So either you're doing something invalid or you don't have valid numbers in one or both of the variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA	ONE_ROW;
	X	=	1;
	Y	=	0;
	Result	=	X / Y;
	OUTPUT;
	STOP;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Yields a missing value as in the below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_0-1623971638383.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60459i5682442AD14447EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jimbarbour_0-1623971638383.png" alt="jimbarbour_0-1623971638383.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Therefore you need to examine the variables and see what's really in them or make sure the divisor isn't zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you show your data, the record that is causing the problem?&amp;nbsp; Can you post your code?&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jun 2021 23:14:57 GMT</pubDate>
    <dc:creator>jimbarbour</dc:creator>
    <dc:date>2021-06-17T23:14:57Z</dc:date>
    <item>
      <title>Divide two variables and get dot (.) in the result of the query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748789#M235202</link>
      <description>&lt;P&gt;Hello team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Divide two numbers in SAS, which their data type is number and I get .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to fix this issue?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Blue&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 23:02:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748789#M235202</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-06-17T23:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Divide two variables and get dot (.) in the result of the query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748790#M235203</link>
      <description>The dot means "missing." One or both of the variables is not a valid number or the operation is not valid (I think division by zero would result in a missing value if SAS doesn't issue an error).&lt;BR /&gt;&lt;BR /&gt;Can you write the values of the two numbers into the log?  &lt;BR /&gt;&lt;BR /&gt;Jim</description>
      <pubDate>Thu, 17 Jun 2021 23:07:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748790#M235203</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-06-17T23:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Divide two variables and get dot (.) in the result of the query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748793#M235205</link>
      <description>&lt;P&gt;Yes, division by zero results in a missing value.&amp;nbsp; So either you're doing something invalid or you don't have valid numbers in one or both of the variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA	ONE_ROW;
	X	=	1;
	Y	=	0;
	Result	=	X / Y;
	OUTPUT;
	STOP;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Yields a missing value as in the below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_0-1623971638383.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60459i5682442AD14447EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jimbarbour_0-1623971638383.png" alt="jimbarbour_0-1623971638383.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Therefore you need to examine the variables and see what's really in them or make sure the divisor isn't zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you show your data, the record that is causing the problem?&amp;nbsp; Can you post your code?&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 23:14:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748793#M235205</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-06-17T23:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Divide two variables and get dot (.) in the result of the query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748803#M235214</link>
      <description>&lt;P&gt;If you attempt to divide by 0 you should get a note in the log about attempted divide by 0.&lt;/P&gt;
&lt;P&gt;Or if you have extremely small numbers that get treated functionally as 0.&lt;/P&gt;
&lt;P&gt;Or if the range of values between the numerator and denominator where things just don't go well.&lt;/P&gt;
&lt;P&gt;If this is the case you might consider the DIVIDE function.&lt;/P&gt;
&lt;PRE&gt;data example;&lt;BR /&gt;input x y;&lt;BR /&gt;result1= divide(x,y);&lt;BR /&gt;datalines;&lt;BR /&gt;15 0&lt;BR /&gt;15 1E-350&lt;BR /&gt;1E300 1E-50&lt;BR /&gt;;&lt;/PRE&gt;
&lt;P&gt;The function returns .I (capital i special missing) or .M ._ special missing depending one whether you would get "infinity" such as 1/0 or minus infinity or other cases. The results are missing but you have an indicator of what may have happened, especially in code with lots of calculations. This will also suppress notes to the log about divide by zero, missing values or "overflow" (values too big or small to store).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 13:03:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748803#M235214</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-18T13:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Divide two variables and get dot (.) in the result of the query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748812#M235221</link>
      <description>Hi, &lt;BR /&gt;Kindly share hos your data looks like.&lt;BR /&gt;Thanks</description>
      <pubDate>Fri, 18 Jun 2021 02:32:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748812#M235221</guid>
      <dc:creator>himself</dc:creator>
      <dc:date>2021-06-18T02:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Divide two variables and get dot (.) in the result of the query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748835#M235235</link>
      <description>&lt;P&gt;Please read the log, it should explain why you see the . in the results.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 06:28:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748835#M235235</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-06-18T06:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Divide two variables and get dot (.) in the result of the query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748854#M235244</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;wrote:
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Divide two numbers in SAS, which their data type is number and I get .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to fix this issue?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What is the "fix" that you think would be correct? What two values are being divided?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 10:43:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/748854#M235244</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-06-18T10:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Divide two variables and get dot (.) in the result of the query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/749166#M235355</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for all the response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The reason I was getting dot is that I have renamed the variables in a proc sql, so for those we don't receive any thing if I use that variable in other place, the dot here is simply not the result of dividing by zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Respectfully,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Blue Blue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jun 2021 21:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/749166#M235355</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-06-20T21:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Divide two variables and get dot (.) in the result of the query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/749312#M235434</link>
      <description>Thanks for the responses.&lt;BR /&gt;&lt;BR /&gt;My data is like this:&lt;BR /&gt;A_Rate   B.Rate&lt;BR /&gt;0.36          0.74&lt;BR /&gt;Then they come as dot and then these two variables appear at the end of the dataset.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Blue Blue</description>
      <pubDate>Mon, 21 Jun 2021 16:34:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/749312#M235434</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-06-21T16:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Divide two variables and get dot (.) in the result of the query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/749317#M235437</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thanks for the responses.&lt;BR /&gt;&lt;BR /&gt;My data is like this:&lt;BR /&gt;A_Rate B.Rate&lt;BR /&gt;0.36 0.74&lt;BR /&gt;Then they come as dot and then these two variables appear at the end of the dataset.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Blue Blue&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;We've gone long enough in this thread and we still are not sure what you have done. You need to show us your code, and show us a representative portion of the data, including some data that illustrates the problem. Please provide the a portion of the data according to &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;&amp;nbsp;(as the above little fragment of text that I have quoted isn't the same as showing us your data set following the instructions and is not sufficient for anyone to diagnose anything).&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 17:04:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/749317#M235437</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-06-21T17:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Divide two variables and get dot (.) in the result of the query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/749319#M235438</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thanks for the responses.&lt;BR /&gt;&lt;BR /&gt;My data is like this:&lt;BR /&gt;A_Rate B.Rate&lt;BR /&gt;0.36 0.74&lt;BR /&gt;Then they come as dot and then these two variables appear at the end of the dataset.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Blue Blue&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You have not posted an CODE so we cannot tell why you might be getting missing values. (Or perhaps you have even created a character variable with a period in it instead of numeric variable with a missing value.)&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 17:02:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/749319#M235438</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-06-21T17:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: Divide two variables and get dot (.) in the result of the query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/749386#M235475</link>
      <description>&lt;P&gt;&lt;STRONG&gt;SHOW.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;THE.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;LOG.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 21:34:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Divide-two-variables-and-get-dot-in-the-result-of-the-query/m-p/749386#M235475</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-21T21:34:13Z</dc:date>
    </item>
  </channel>
</rss>

