<?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 FINDING THE MISSING observation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/FINDING-THE-MISSING-observation/m-p/13585#M1611</link>
    <description>I can't find the missing school:  Los_angeles has 2140 observations and KALA has 2141 observations.  I tried using the following code to determine which observation is missing but can't.  &lt;BR /&gt;
&lt;BR /&gt;
DATA MATCH LOS_ANGELES KALA;&lt;BR /&gt;
	MERGE LOS_ANGELES (IN=L)&lt;BR /&gt;
	  KALA (IN=K);&lt;BR /&gt;
	BY SCHNAME;&lt;BR /&gt;
	IF L AND NOT K THEN OUTPUT LOS_ANGELES;&lt;BR /&gt;
	IF NOT L AND K THEN OUTPUT KALA;&lt;BR /&gt;
	IF L AND K THEN OUTPUT MATCH;&lt;BR /&gt;
RUN;</description>
    <pubDate>Fri, 25 Apr 2008 22:58:21 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-04-25T22:58:21Z</dc:date>
    <item>
      <title>FINDING THE MISSING observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FINDING-THE-MISSING-observation/m-p/13585#M1611</link>
      <description>I can't find the missing school:  Los_angeles has 2140 observations and KALA has 2141 observations.  I tried using the following code to determine which observation is missing but can't.  &lt;BR /&gt;
&lt;BR /&gt;
DATA MATCH LOS_ANGELES KALA;&lt;BR /&gt;
	MERGE LOS_ANGELES (IN=L)&lt;BR /&gt;
	  KALA (IN=K);&lt;BR /&gt;
	BY SCHNAME;&lt;BR /&gt;
	IF L AND NOT K THEN OUTPUT LOS_ANGELES;&lt;BR /&gt;
	IF NOT L AND K THEN OUTPUT KALA;&lt;BR /&gt;
	IF L AND K THEN OUTPUT MATCH;&lt;BR /&gt;
RUN;</description>
      <pubDate>Fri, 25 Apr 2008 22:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FINDING-THE-MISSING-observation/m-p/13585#M1611</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-04-25T22:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: FINDING THE MISSING observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FINDING-THE-MISSING-observation/m-p/13586#M1612</link>
      <description>Teresa, &lt;BR /&gt;
&lt;BR /&gt;
you have made one mistake and think about the second remark&lt;BR /&gt;
Andre&lt;BR /&gt;
&lt;BR /&gt;
1) you are overwriting your source LOS_Angeles With your code replacing it!&lt;BR /&gt;
&lt;BR /&gt;
see how to avoid this&lt;BR /&gt;
&lt;BR /&gt;
[PRE]&lt;BR /&gt;
25   DATA MATCH LOS K;&lt;BR /&gt;
26   MERGE LOS_ANGELES (IN=L)&lt;BR /&gt;
27   KALA (IN=K);&lt;BR /&gt;
28   BY SCHNAME;&lt;BR /&gt;
29   IF L AND NOT K THEN OUTPUT LOS;&lt;BR /&gt;
30   IF NOT L AND K THEN OUTPUT K;&lt;BR /&gt;
31   IF L AND K THEN OUTPUT MATCH;&lt;BR /&gt;
32   RUN;&lt;BR /&gt;
&lt;BR /&gt;
INFO: The variable one on data set WORK.LOS_ANGELES will be overwritten by data set WORK.KALA.&lt;BR /&gt;
INFO: The variable two on data set WORK.LOS_ANGELES will be overwritten by data set WORK.KALA.&lt;BR /&gt;
NOTE: There were 2 observations read from the data set WORK.LOS_ANGELES.&lt;BR /&gt;
NOTE: There were 3 observations read from the data set WORK.KALA.&lt;BR /&gt;
NOTE: The data set WORK.MATCH has 2 observations and 4 variables.&lt;BR /&gt;
NOTE: The data set WORK.LOS has 0 observations and 4 variables.&lt;BR /&gt;
NOTE: The data set WORK.K has 1 observations and 4 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.06 seconds&lt;BR /&gt;
      cpu time            0.01 seconds&lt;BR /&gt;
[/PRE]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
and second point&lt;BR /&gt;
How are you sure there is only one record that differ?&lt;BR /&gt;
&lt;BR /&gt;
This can also happen  with this startpoint&lt;BR /&gt;
&lt;BR /&gt;
[PRE] &lt;BR /&gt;
Data los_angeles;&lt;BR /&gt;
input schname $1. one two;&lt;BR /&gt;
datalines;&lt;BR /&gt;
A 12 36&lt;BR /&gt;
B 15 25&lt;BR /&gt;
;&lt;BR /&gt;
data Kala;&lt;BR /&gt;
input schname $1. one two three;&lt;BR /&gt;
datalines;&lt;BR /&gt;
D . 36  45&lt;BR /&gt;
E 75 27 .&lt;BR /&gt;
C 1   2 3&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
Proc sort data=Kala; by schname;run;&lt;BR /&gt;
&lt;BR /&gt;
INFO: The variable one on data set WORK.LOS_ANGELES will be overwritten by data set WORK.KALA.&lt;BR /&gt;
INFO: The variable two on data set WORK.LOS_ANGELES will be overwritten by data set WORK.KALA.&lt;BR /&gt;
NOTE: There were 2 observations read from the data set WORK.LOS_ANGELES.&lt;BR /&gt;
NOTE: There were 3 observations read from the data set WORK.KALA.&lt;BR /&gt;
NOTE: The data set WORK.MATCH has 0 observations and 4 variables.&lt;BR /&gt;
NOTE: The data set WORK.LOS has 2 observations and 4 variables.&lt;BR /&gt;
NOTE: The data set WORK.K has 3 observations and 4 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.01 seconds&lt;BR /&gt;
      cpu time            0.01 seconds&lt;BR /&gt;
[/PRE]</description>
      <pubDate>Mon, 28 Apr 2008 07:45:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FINDING-THE-MISSING-observation/m-p/13586#M1612</guid>
      <dc:creator>Andre</dc:creator>
      <dc:date>2008-04-28T07:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: FINDING THE MISSING observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FINDING-THE-MISSING-observation/m-p/13587#M1613</link>
      <description>Thanks Andre! I appreciate your help.</description>
      <pubDate>Tue, 29 Apr 2008 17:31:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FINDING-THE-MISSING-observation/m-p/13587#M1613</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-04-29T17:31:24Z</dc:date>
    </item>
  </channel>
</rss>

