<?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 Finding observations with value closest to a fixed value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Finding-observations-with-value-closest-to-a-fixed-value/m-p/386958#M92723</link>
    <description>Hi all&lt;BR /&gt;&lt;BR /&gt;I want to keep an observation with a variable closet to a fixed value.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;Data contain;&lt;BR /&gt;Input age rank;&lt;BR /&gt;85 0&lt;BR /&gt;84 1&lt;BR /&gt;86 2&lt;BR /&gt;83 3&lt;BR /&gt;87 4&lt;BR /&gt;88 5&lt;BR /&gt;89 6&lt;BR /&gt;90 7&lt;BR /&gt;91 8&lt;BR /&gt;92 9&lt;BR /&gt;93 10&lt;BR /&gt;94 11&lt;BR /&gt;95 12&lt;BR /&gt;96 13&lt;BR /&gt;97 14&lt;BR /&gt;98 15&lt;BR /&gt;99 16;&lt;BR /&gt;&lt;BR /&gt;So, I want to keep the the age close to 100.</description>
    <pubDate>Thu, 10 Aug 2017 12:10:54 GMT</pubDate>
    <dc:creator>Qhamisafeketsha</dc:creator>
    <dc:date>2017-08-10T12:10:54Z</dc:date>
    <item>
      <title>Finding observations with value closest to a fixed value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-observations-with-value-closest-to-a-fixed-value/m-p/386958#M92723</link>
      <description>Hi all&lt;BR /&gt;&lt;BR /&gt;I want to keep an observation with a variable closet to a fixed value.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;Data contain;&lt;BR /&gt;Input age rank;&lt;BR /&gt;85 0&lt;BR /&gt;84 1&lt;BR /&gt;86 2&lt;BR /&gt;83 3&lt;BR /&gt;87 4&lt;BR /&gt;88 5&lt;BR /&gt;89 6&lt;BR /&gt;90 7&lt;BR /&gt;91 8&lt;BR /&gt;92 9&lt;BR /&gt;93 10&lt;BR /&gt;94 11&lt;BR /&gt;95 12&lt;BR /&gt;96 13&lt;BR /&gt;97 14&lt;BR /&gt;98 15&lt;BR /&gt;99 16;&lt;BR /&gt;&lt;BR /&gt;So, I want to keep the the age close to 100.</description>
      <pubDate>Thu, 10 Aug 2017 12:10:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-observations-with-value-closest-to-a-fixed-value/m-p/386958#M92723</guid>
      <dc:creator>Qhamisafeketsha</dc:creator>
      <dc:date>2017-08-10T12:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Finding observations with value closest to a fixed value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-observations-with-value-closest-to-a-fixed-value/m-p/386962#M92726</link>
      <description>&lt;P&gt;Quick SQL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select *, abs(100 - age) as dist
from contain
having dist = min(dist)
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Aug 2017 12:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-observations-with-value-closest-to-a-fixed-value/m-p/386962#M92726</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-08-10T12:25:56Z</dc:date>
    </item>
  </channel>
</rss>

