<?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: Counting number of record meeting condition in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Counting-number-of-record-meeting-condition/m-p/163669#M300248</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data value;&lt;BR /&gt;input value;&lt;BR /&gt;datalines;&lt;BR /&gt;-0.2&lt;BR /&gt;-0.3&lt;BR /&gt;-0.5&lt;BR /&gt;0.2&lt;BR /&gt;2.3&lt;BR /&gt;1.3&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data level;&lt;BR /&gt;input lv1 lv2 lv3 lv4 lv5;&lt;BR /&gt;datalines;&lt;BR /&gt;-1 0.5 1.5&amp;nbsp; 2.5 3.0&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table have as&lt;BR /&gt;select * from value,level;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want(drop=i);&lt;BR /&gt;set have;&lt;BR /&gt;array l{*} lv1-lv5;&lt;BR /&gt;array r{*} range1 range2 range3 range4;&lt;BR /&gt;do i=1 to dim(l);&lt;BR /&gt;if value&amp;gt;=l{i} and value&amp;lt;=l{i+1} then r{i}=1;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc freq data=want;&lt;BR /&gt;table r:;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Aug 2014 22:19:52 GMT</pubDate>
    <dc:creator>stat_sas</dc:creator>
    <dc:date>2014-08-15T22:19:52Z</dc:date>
    <item>
      <title>Counting number of record meeting condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-number-of-record-meeting-condition/m-p/163668#M300247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have value file having 1 variable "value" and a level file which has different level.&lt;/P&gt;&lt;P&gt;I want to create a new file that count the number of record in value file that fall in the range specified in level file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the data below, the range [-1&amp;nbsp; to 0.5] has 4 record; [0.5 to 1.5] has 1 record; [1.5 to 2.5] has 1 record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HHC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data value;&lt;/P&gt;&lt;P&gt;input value;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;-0.2&lt;/P&gt;&lt;P&gt;-0.3&lt;/P&gt;&lt;P&gt;-0.5&lt;/P&gt;&lt;P&gt;0.2&lt;/P&gt;&lt;P&gt;2.3&lt;/P&gt;&lt;P&gt;1.3&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data level;&lt;/P&gt;&lt;P&gt;input lv1 lv2 lv3 lv4 lv5;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;-1 0.5 1.5&amp;nbsp; 2.5 3.0&lt;/P&gt;&lt;P&gt;;run; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2014 21:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-number-of-record-meeting-condition/m-p/163668#M300247</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2014-08-15T21:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Counting number of record meeting condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-number-of-record-meeting-condition/m-p/163669#M300248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data value;&lt;BR /&gt;input value;&lt;BR /&gt;datalines;&lt;BR /&gt;-0.2&lt;BR /&gt;-0.3&lt;BR /&gt;-0.5&lt;BR /&gt;0.2&lt;BR /&gt;2.3&lt;BR /&gt;1.3&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data level;&lt;BR /&gt;input lv1 lv2 lv3 lv4 lv5;&lt;BR /&gt;datalines;&lt;BR /&gt;-1 0.5 1.5&amp;nbsp; 2.5 3.0&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table have as&lt;BR /&gt;select * from value,level;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want(drop=i);&lt;BR /&gt;set have;&lt;BR /&gt;array l{*} lv1-lv5;&lt;BR /&gt;array r{*} range1 range2 range3 range4;&lt;BR /&gt;do i=1 to dim(l);&lt;BR /&gt;if value&amp;gt;=l{i} and value&amp;lt;=l{i+1} then r{i}=1;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc freq data=want;&lt;BR /&gt;table r:;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2014 22:19:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-number-of-record-meeting-condition/m-p/163669#M300248</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-08-15T22:19:52Z</dc:date>
    </item>
  </channel>
</rss>

