<?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 missing observations in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/finding-missing-observations/m-p/75449#M21895</link>
    <description>Here is what I do when I want to see what is in one table that is not in the other.  Hope it makes sense and/or helps.&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=TableA; by keyvariable; run;&lt;BR /&gt;
proc sort data=TableB; by keyvariable; run;&lt;BR /&gt;
&lt;BR /&gt;
data Aonly Bonly Both;&lt;BR /&gt;
merge TableA (in=A)&lt;BR /&gt;
          TableB (in=B);&lt;BR /&gt;
  by keyvariable;&lt;BR /&gt;
 if A and B then output Both; else&lt;BR /&gt;
if A and not B then output Aonly; else&lt;BR /&gt;
if B and not A then output Bonly;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc print data=Aonly; run;</description>
    <pubDate>Wed, 25 Feb 2009 14:09:29 GMT</pubDate>
    <dc:creator>stateworker</dc:creator>
    <dc:date>2009-02-25T14:09:29Z</dc:date>
    <item>
      <title>finding missing observations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/finding-missing-observations/m-p/75448#M21894</link>
      <description>Hi,&lt;BR /&gt;
I have a table A with 10 variables and 3200 observations, i run the proc summary nway to find the frequency of records with consideration of 5 variables ( in my class statement) and i am &lt;B&gt;using the missing&lt;/B&gt; option in my summary nway.&lt;BR /&gt;
In my output i am getting only 2825 observations.&lt;BR /&gt;
1). i would like to know how to find the missing observations in table B from Table A ( i.e observations that are in table A not in table B).&lt;BR /&gt;
2). Why some of the observations are missing &lt;BR /&gt;
&lt;BR /&gt;
I will be thankful if anyone could help me.&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance,&lt;BR /&gt;
sams</description>
      <pubDate>Wed, 25 Feb 2009 14:05:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/finding-missing-observations/m-p/75448#M21894</guid>
      <dc:creator>ssas</dc:creator>
      <dc:date>2009-02-25T14:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: finding missing observations</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/finding-missing-observations/m-p/75449#M21895</link>
      <description>Here is what I do when I want to see what is in one table that is not in the other.  Hope it makes sense and/or helps.&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=TableA; by keyvariable; run;&lt;BR /&gt;
proc sort data=TableB; by keyvariable; run;&lt;BR /&gt;
&lt;BR /&gt;
data Aonly Bonly Both;&lt;BR /&gt;
merge TableA (in=A)&lt;BR /&gt;
          TableB (in=B);&lt;BR /&gt;
  by keyvariable;&lt;BR /&gt;
 if A and B then output Both; else&lt;BR /&gt;
if A and not B then output Aonly; else&lt;BR /&gt;
if B and not A then output Bonly;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc print data=Aonly; run;</description>
      <pubDate>Wed, 25 Feb 2009 14:09:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/finding-missing-observations/m-p/75449#M21895</guid>
      <dc:creator>stateworker</dc:creator>
      <dc:date>2009-02-25T14:09:29Z</dc:date>
    </item>
  </channel>
</rss>

