<?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: How to write this code clear with less sentences? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-this-code-clear-with-less-sentences/m-p/407488#M99314</link>
    <description>Thank you!</description>
    <pubDate>Wed, 25 Oct 2017 21:58:54 GMT</pubDate>
    <dc:creator>audreyliu201</dc:creator>
    <dc:date>2017-10-25T21:58:54Z</dc:date>
    <item>
      <title>How to write this code clear with less sentences?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-this-code-clear-with-less-sentences/m-p/407485#M99312</link>
      <description>&lt;P&gt;Hi, Do you know how to write this in a simpler way?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data distanceclass;
set combine;
retain Dist_class 0;
If 0&amp;lt;miles&amp;lt;=0.5 then dist_class=0.5;
If 0.5&amp;lt;miles&amp;lt;=1 then dist_class=1.0;
If 1.0&amp;lt;miles&amp;lt;=1.5 then dist_class=1.5;
If 1.5&amp;lt;miles&amp;lt;=2.0 then dist_class=2.0;
If 2.0&amp;lt;miles&amp;lt;=2.5 then dist_class=2.5;
If 2.5&amp;lt;miles&amp;lt;=3.0 then dist_class=3.0;
If 3.0&amp;lt;miles&amp;lt;=3.5 then dist_class=3.5;
If 3.5&amp;lt;miles&amp;lt;=4.0 then dist_class=4.0;
If 4.0&amp;lt;miles&amp;lt;=4.5 then dist_class=4.5;
If 4.5&amp;lt;miles&amp;lt;=5.0 then dist_class=5.0;
If 5.0&amp;lt;miles&amp;lt;=5.5 then dist_class=5.5;
If 5.5&amp;lt;miles&amp;lt;=6.0 then dist_class=6.0;
If 6.0&amp;lt;miles&amp;lt;=6.5 then dist_class=6.5;
If 6.5&amp;lt;miles&amp;lt;=7.0 then dist_class=7.0;
If 7.0&amp;lt;miles&amp;lt;=7.5 then dist_class=7.5;
If 7.5&amp;lt;miles&amp;lt;=8.0 then dist_class=8.0;
If 8.0&amp;lt;miles&amp;lt;=8.5 then dist_class=8.5;
If 8.5&amp;lt;miles&amp;lt;=9.0 then dist_class=9.0;
If 9.0&amp;lt;miles&amp;lt;=9.5 then dist_class=9.5;
If 9.5&amp;lt;miles&amp;lt;=10.0 then dist_class=10.0;
If 10.0&amp;lt;miles&amp;lt;=10.5 then dist_class=10.5;
If 10.5&amp;lt;miles&amp;lt;=11.0 then dist_class=11.0;
If 11.0&amp;lt;miles&amp;lt;=11.5 then dist_class=11.5;
If 11.5&amp;lt;miles&amp;lt;=12.0 then dist_class=12.0;
If 12.0&amp;lt;miles&amp;lt;=12.5 then dist_class=12.5;
If 12.5&amp;lt;miles&amp;lt;=13.0 then dist_class=13.0;
If 13.0&amp;lt;miles&amp;lt;=13.5 then dist_class=13.5;
If 13.5&amp;lt;miles&amp;lt;=14.0 then dist_class=14.0;
If 14.0&amp;lt;miles&amp;lt;=14.5 then dist_class=14.5;
If 14.5&amp;lt;miles&amp;lt;=15.0 then dist_class=15.0;
If 15.0&amp;lt;miles&amp;lt;=15.5 then dist_class=15.5;
If 15.5&amp;lt;miles&amp;lt;=16.0 then dist_class=16.0;
If 16.0&amp;lt;miles&amp;lt;=16.5 then dist_class=16.5;
If 16.5&amp;lt;miles&amp;lt;=17.0 then dist_class=17.0;
If 17.0&amp;lt;miles&amp;lt;=17.5 then dist_class=17.5;
If 17.5&amp;lt;miles&amp;lt;=18.0 then dist_class=18.0;
If 18.0&amp;lt;miles&amp;lt;=18.5 then dist_class=18.5;
If 18.5&amp;lt;miles&amp;lt;=19.0 then dist_class=19.0;
If 19.0&amp;lt;miles&amp;lt;=19.5 then dist_class=19.5;
If 19.5&amp;lt;miles then dist_class=20.0;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Oct 2017 21:49:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-this-code-clear-with-less-sentences/m-p/407485#M99312</guid>
      <dc:creator>audreyliu201</dc:creator>
      <dc:date>2017-10-25T21:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to write this code clear with less sentences?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-this-code-clear-with-less-sentences/m-p/407487#M99313</link>
      <description>&lt;P&gt;For most categories, you can get away with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dist_class = ceil(2 * miles) / 2;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the higher values, you also need to add:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if dist_class &amp;gt; 20 then dist_class = 20;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 21:59:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-this-code-clear-with-less-sentences/m-p/407487#M99313</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-10-25T21:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to write this code clear with less sentences?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-this-code-clear-with-less-sentences/m-p/407488#M99314</link>
      <description>Thank you!</description>
      <pubDate>Wed, 25 Oct 2017 21:58:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-this-code-clear-with-less-sentences/m-p/407488#M99314</guid>
      <dc:creator>audreyliu201</dc:creator>
      <dc:date>2017-10-25T21:58:54Z</dc:date>
    </item>
  </channel>
</rss>

