<?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 Round up to nearest 1000 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/round-to-close-up-1000/m-p/649467#M194727</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data ttt;
input ID X;
cards;
1 5100
2 5902
3 7812
4 12210
5 5988
6 7102
7 7980
;
run;

data ttt2;
set ttt;
IF x&amp;gt;=5000 and X&amp;lt;6000 then X_new=5000;
else x_new=1000*ceil(x/1000);
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 21 May 2020 07:01:21 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2020-05-21T07:01:21Z</dc:date>
    <item>
      <title>round to close up 1000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/round-to-close-up-1000/m-p/649463#M194725</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to create a new variable called X_new that will get following values:&lt;/P&gt;
&lt;P&gt;IF x&amp;gt;=5000 and X&amp;lt;6000 then X_new=5000&lt;/P&gt;
&lt;P&gt;IF X&amp;gt;=6000 then x_new will be the the round up by 1000 value&lt;/P&gt;
&lt;P&gt;so expected values of x_new are:&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;X=5100 x_new=5000&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;X=5902 x_new=5000
&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;X=7812 x_new=8000
&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;X=12210 x_new=13000
&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;X=5988 x_new=6000&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;X=7102 x_new=8000
&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;X=7980&amp;nbsp;x_new=8000&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;What&amp;nbsp;is&amp;nbsp;the&amp;nbsp;way&amp;nbsp;to&amp;nbsp;do&amp;nbsp;it&amp;nbsp;please?&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data tbl;
input ID X;
cards;
1 5100
2 5902
3 7812
4 12210
5 5988
6 7102
7 7980
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 06:42:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/round-to-close-up-1000/m-p/649463#M194725</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2020-05-21T06:42:58Z</dc:date>
    </item>
    <item>
      <title>Round up to nearest 1000</title>
      <link>https://communities.sas.com/t5/SAS-Programming/round-to-close-up-1000/m-p/649467#M194727</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data ttt;
input ID X;
cards;
1 5100
2 5902
3 7812
4 12210
5 5988
6 7102
7 7980
;
run;

data ttt2;
set ttt;
IF x&amp;gt;=5000 and X&amp;lt;6000 then X_new=5000;
else x_new=1000*ceil(x/1000);
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 May 2020 07:01:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/round-to-close-up-1000/m-p/649467#M194727</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2020-05-21T07:01:21Z</dc:date>
    </item>
  </channel>
</rss>

