<?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: round to  nearest 100 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/round-to-nearest-100/m-p/679343#M205127</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to round numbers to close 100.&lt;/P&gt;
&lt;P&gt;This program work fine but there are few problems:&lt;/P&gt;
&lt;P&gt;number 750 should be rounded to 800&lt;/P&gt;
&lt;P&gt;number 126750 should be rounded to 126800&lt;/P&gt;
&lt;P&gt;What is the way to get correct round numbers as m requested&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;i don't see a problem:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="round.PNG" style="width: 169px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48642i7353A055706B9BF0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="round.PNG" alt="round.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Aug 2020 05:08:11 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2020-08-26T05:08:11Z</dc:date>
    <item>
      <title>round to  nearest 100</title>
      <link>https://communities.sas.com/t5/SAS-Programming/round-to-nearest-100/m-p/679340#M205126</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to round numbers to close 100.&lt;/P&gt;
&lt;P&gt;This program work fine but there are few problems:&lt;/P&gt;
&lt;P&gt;number 750 should be rounded to 800&lt;/P&gt;
&lt;P&gt;number 126750 should be rounded to 126800&lt;/P&gt;
&lt;P&gt;What is the way to get correct round numbers as m requested&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data t;
input x;
cards;
640
751
750
382640
41864
126750
;
run;

data new;
set t;
x_new=round(x,100);
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Aug 2020 05:02:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/round-to-nearest-100/m-p/679340#M205126</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2020-08-26T05:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: round to  nearest 100</title>
      <link>https://communities.sas.com/t5/SAS-Programming/round-to-nearest-100/m-p/679343#M205127</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to round numbers to close 100.&lt;/P&gt;
&lt;P&gt;This program work fine but there are few problems:&lt;/P&gt;
&lt;P&gt;number 750 should be rounded to 800&lt;/P&gt;
&lt;P&gt;number 126750 should be rounded to 126800&lt;/P&gt;
&lt;P&gt;What is the way to get correct round numbers as m requested&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;i don't see a problem:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="round.PNG" style="width: 169px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48642i7353A055706B9BF0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="round.PNG" alt="round.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 05:08:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/round-to-nearest-100/m-p/679343#M205127</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-08-26T05:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: round to  nearest 100</title>
      <link>https://communities.sas.com/t5/SAS-Programming/round-to-nearest-100/m-p/679521#M205196</link>
      <description>&lt;P&gt;One thing to be careful of when examining some of the results of functions is to make sure that you &lt;STRONG&gt;know&lt;/STRONG&gt; the value of the variable. If you look at a result and see "750" where you think the round should give you "800" but the result is "700" then you&amp;nbsp; need to consider that the format for the variable may be hiding something from you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data example;
   input x;
   rndx = round(x,100);
   format x f3.;
datalines;
749.856
750.111
;

proc print data=example;
run;
&lt;/PRE&gt;
&lt;P&gt;So the above in the Print output will show both values of X as 750 with different rounded values because the current format only displays 3 characters and no decimals.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if the round for your actual data appears to be off, examine the base values with a format that will display a lot of decimal places, I suggest something like BEST32.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 15:12:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/round-to-nearest-100/m-p/679521#M205196</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-26T15:12:08Z</dc:date>
    </item>
  </channel>
</rss>

