<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/finding-the-range/m-p/496139#M131133</link>
    <description>&lt;P&gt;Not the most beautiful, but works in this case...:)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
 create table want as
 select  cats (x, min(y),'-',x,max(y)) as mix
 from have
 group by x
 ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;//Fredrik&lt;/P&gt;</description>
    <pubDate>Mon, 17 Sep 2018 07:35:27 GMT</pubDate>
    <dc:creator>FredrikE</dc:creator>
    <dc:date>2018-09-17T07:35:27Z</dc:date>
    <item>
      <title>finding the range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-the-range/m-p/496132#M131131</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have a dataset&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data have;
input x $ Y $;
datalines
08 c1
08 c2
09 c1
09 c2
09 c3
10 c1
10 c2
10 c3
10 c4
;
run;&lt;/PRE&gt;&lt;P&gt;I want my output to be&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;08c1-08c2
09c1-09c3
10c1-10c4&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 06:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-the-range/m-p/496132#M131131</guid>
      <dc:creator>shubham1</dc:creator>
      <dc:date>2018-09-17T06:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: finding the range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-the-range/m-p/496139#M131133</link>
      <description>&lt;P&gt;Not the most beautiful, but works in this case...:)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
 create table want as
 select  cats (x, min(y),'-',x,max(y)) as mix
 from have
 group by x
 ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;//Fredrik&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 07:35:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-the-range/m-p/496139#M131133</guid>
      <dc:creator>FredrikE</dc:creator>
      <dc:date>2018-09-17T07:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: finding the range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-the-range/m-p/496140#M131134</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input x $ Y $;
datalines;
08 c1
08 c2
09 c1
09 c2
09 c3
10 c1
10 c2
10 c3
10 c4
;
run;

data want(keep=NewVar);
   set have;
   by x;
   if first.x then NewVar=cats(x, Y);
   if last.x then do;
      NewVar=catx('-', NewVar, cats(x, Y));
      output;
   end;
   retain NewVar;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Sep 2018 07:50:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-the-range/m-p/496140#M131134</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-09-17T07:50:24Z</dc:date>
    </item>
  </channel>
</rss>

