<?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: finding the range of a value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/finding-the-range-of-a-value/m-p/779795#M248409</link>
    <description>&lt;PRE&gt;data have;
    infile datalines truncover ;
  input age;
datalines;
23
43
.
55
60
94
55
60
;


proc sql;
select cats('(',min(age),'-',max(age),')') as range label='#'
 from have;
quit;&lt;/PRE&gt;</description>
    <pubDate>Thu, 11 Nov 2021 13:53:34 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-11-11T13:53:34Z</dc:date>
    <item>
      <title>finding the range of a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-the-range-of-a-value/m-p/779565#M248304</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;assuming I have this&amp;nbsp; dataset and I want to find the range of the ages.&lt;/P&gt;
&lt;P&gt;If I want the range to be displayed like (23-94). How do I do that?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
    infile datalines truncover ;
  input age;
datalines;
23
43

55
60
94
55
60&lt;BR /&gt;
;
run&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 14:30:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-the-range-of-a-value/m-p/779565#M248304</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-11-10T14:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: finding the range of a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-the-range-of-a-value/m-p/779569#M248307</link>
      <description>&lt;P&gt;What do expect as result exactly?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Untested:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have end=jobDone;
  retain min max;
  if _n_ = 1 then do;
    min = 99999;
    max = 0;
  end;

  min = min(min, age);
  max = max(max, age);

  if jobDone then do;
    put min " - " max;
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Nov 2021 14:33:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-the-range-of-a-value/m-p/779569#M248307</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-11-10T14:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: finding the range of a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-the-range-of-a-value/m-p/779795#M248409</link>
      <description>&lt;PRE&gt;data have;
    infile datalines truncover ;
  input age;
datalines;
23
43
.
55
60
94
55
60
;


proc sql;
select cats('(',min(age),'-',max(age),')') as range label='#'
 from have;
quit;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Nov 2021 13:53:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-the-range-of-a-value/m-p/779795#M248409</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-11-11T13:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: finding the range of a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-the-range-of-a-value/m-p/779798#M248412</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select min(age), "-", max(age)
from have;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Nov 2021 14:01:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-the-range-of-a-value/m-p/779798#M248412</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-11T14:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: finding the range of a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-the-range-of-a-value/m-p/780207#M248580</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;: Thankyou all for the reply, I will try that&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 10:01:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-the-range-of-a-value/m-p/780207#M248580</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-11-15T10:01:49Z</dc:date>
    </item>
  </channel>
</rss>

