<?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: Matching values in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Matching-values/m-p/638339#M21554</link>
    <description>&lt;P&gt;Use a double do loop:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
_b = 9999999999;
do until (done1);
  set have end=done1;
  if b &amp;gt; .99 and b &amp;lt; _b
  then do;
    _c = a;
    _b = b;
  end;
end;
do until (done2);
  set have end=done2;
  c = _c;
  output;
end;
drop _:;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 08 Apr 2020 15:24:30 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-04-08T15:24:30Z</dc:date>
    <item>
      <title>Matching values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Matching-values/m-p/638330#M21553</link>
      <description>&lt;P&gt;&lt;FONT&gt;I'd like to write a code that creates column C from A and B. Column C will be, the value of A from the row where B is the smallest value greater or equal to 0.99. If there are repeated values as in the example, the value must be the first of them.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;A &amp;nbsp; &amp;nbsp; B&lt;FONT&gt; &amp;nbsp; &amp;nbsp; &lt;/FONT&gt;&lt;FONT&gt;&amp;nbsp; &amp;nbsp; &lt;/FONT&gt;&lt;FONT&gt;&amp;nbsp; &amp;nbsp; &lt;/FONT&gt;C&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;1&lt;FONT&gt; &amp;nbsp; &amp;nbsp; &lt;/FONT&gt;0.2&lt;FONT&gt; &amp;nbsp; &amp;nbsp; &lt;/FONT&gt;&lt;FONT&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/FONT&gt;&lt;FONT&gt; 4&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;2&lt;FONT&gt; &amp;nbsp; &amp;nbsp; &lt;/FONT&gt;0.05&lt;FONT&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;3&lt;FONT&gt; &amp;nbsp; &amp;nbsp; &lt;/FONT&gt;0.9&lt;FONT&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/FONT&gt;4&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;4&lt;FONT&gt; &amp;nbsp; &amp;nbsp; &lt;/FONT&gt;0.9901 &amp;nbsp; &amp;nbsp; 4&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;5&lt;FONT&gt; &amp;nbsp; &amp;nbsp; &lt;/FONT&gt;0.9901&lt;FONT&gt; &amp;nbsp; &amp;nbsp; &lt;/FONT&gt;4&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;6&lt;FONT&gt; &amp;nbsp; &amp;nbsp; &lt;/FONT&gt;0.9901&lt;FONT&gt; &amp;nbsp; &amp;nbsp; &lt;/FONT&gt;4&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;7&lt;FONT&gt; &amp;nbsp; &amp;nbsp; &lt;/FONT&gt;0.995&lt;FONT&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/FONT&gt;4&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 14:38:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Matching-values/m-p/638330#M21553</guid>
      <dc:creator>usuario_estudo</dc:creator>
      <dc:date>2020-04-08T14:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Matching values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Matching-values/m-p/638339#M21554</link>
      <description>&lt;P&gt;Use a double do loop:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
_b = 9999999999;
do until (done1);
  set have end=done1;
  if b &amp;gt; .99 and b &amp;lt; _b
  then do;
    _c = a;
    _b = b;
  end;
end;
do until (done2);
  set have end=done2;
  c = _c;
  output;
end;
drop _:;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Apr 2020 15:24:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Matching-values/m-p/638339#M21554</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-08T15:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Matching values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Matching-values/m-p/638406#M21556</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	input A B;
	cards;
1     0.2    
2     0.05   
3     0.9    
4     0.9901 
5     0.9901 
6     0.9901 
7     0.995 
;

proc sql noprint;
	select a, min(b) into :a trimmed, :b trimmed 
	  from have &lt;BR /&gt;        where b ge 0.99;
quit;

%put a=&amp;amp;a  b=&amp;amp;b;

data want;
	set have;
	c=&amp;amp;a;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Apr 2020 17:33:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Matching-values/m-p/638406#M21556</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2020-04-08T17:33:45Z</dc:date>
    </item>
  </channel>
</rss>

