<?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: How to find exact same observations? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-exact-same-observations/m-p/372850#M276135</link>
    <description>&lt;P&gt;You should use PROC SORT to actively identify your duplicates.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If youre using PROC FREQ you need to remove the BY and add * between the variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This finds duplicates across age and sex.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc freq data = SASHELP.class;
Table sex*age / out = record_count list;
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 03 Jul 2017 20:23:19 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-07-03T20:23:19Z</dc:date>
    <item>
      <title>How to find exact same observations?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-exact-same-observations/m-p/372847#M276134</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;I want to find observations which have same attitudes by TRD_EVENT_DT, TRD_STCK_CD, TRD_EVENT_TM, TRD_PR, TRD_TUROVR variables.&lt;/P&gt;&lt;P&gt;Variables are:&amp;nbsp;&lt;/P&gt;&lt;P&gt;TRD_EVENT_DT = Date&lt;/P&gt;&lt;P&gt;TRD_STCK_CD = Name&lt;/P&gt;&lt;P&gt;TRD_EVENT_TM = Time&lt;/P&gt;&lt;P&gt;TRD_PR = Price&lt;/P&gt;&lt;P&gt;TRD_TUROVR = Turnover&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sampledata out=sampledata01;
    by  TRD_EVENT_DT TRD_STCK_CD TRD_EVENT_TM TRD_PR TRD_TUROVR;
run;
* Using PROC FREQ to find duplicate observations and route them to an output data set with multiple key variables;
proc freq data = sampledata01 noprint ;
by TRD_EVENT_DT TRD_STCK_CD TRD_EVENT_TM TRD_PR TRD_TUROVR;
table  TRD_EVENT_DT TRD_STCK_CD TRD_EVENT_TM TRD_PR TRD_TUROVR / out = sampledata_DUP 
(keep = TRD_EVENT_DT TRD_STCK_CD TRD_EVENT_TM TRD_PR TRD_TUROVR Count where = (Count &amp;gt; 1)) ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this code true?&lt;/P&gt;&lt;P&gt;If not, Please tell me which statement is wrong.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 20:16:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-exact-same-observations/m-p/372847#M276134</guid>
      <dc:creator>aminkarimid</dc:creator>
      <dc:date>2017-07-03T20:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to find exact same observations?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-exact-same-observations/m-p/372850#M276135</link>
      <description>&lt;P&gt;You should use PROC SORT to actively identify your duplicates.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If youre using PROC FREQ you need to remove the BY and add * between the variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This finds duplicates across age and sex.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc freq data = SASHELP.class;
Table sex*age / out = record_count list;
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Jul 2017 20:23:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-exact-same-observations/m-p/372850#M276135</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-03T20:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to find exact same observations?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-exact-same-observations/m-p/373098#M276136</link>
      <description>&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10121iDD3E0692C281629D/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This pic is a part of output.&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;'s codes shows frequency of all data. However, I just want to find duplicate observations.&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 21:32:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-exact-same-observations/m-p/373098#M276136</guid>
      <dc:creator>aminkarimid</dc:creator>
      <dc:date>2017-07-04T21:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to find exact same observations?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-exact-same-observations/m-p/373102#M276137</link>
      <description>&lt;P&gt;Filter it. A duplicate will have a count of more than 1.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 22:33:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-exact-same-observations/m-p/373102#M276137</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-04T22:33:17Z</dc:date>
    </item>
  </channel>
</rss>

