<?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: Whole Dataset, Subset of Dataset, Which Observations Missing? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103028#M28845</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I have used SQL merging here and it does not require prior sorting . Please find below the code for your reference.&lt;/P&gt;&lt;P&gt;==============================================&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;input id @@;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 2 3 4 5 6 7 8&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data b;&lt;/P&gt;&lt;P&gt;input id @@;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;2 4 6 8&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table missing as select * from a where a.id not in (select id from b);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=missing;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;===================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Daman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Feb 2013 07:28:31 GMT</pubDate>
    <dc:creator>damanaulakh88</dc:creator>
    <dc:date>2013-02-08T07:28:31Z</dc:date>
    <item>
      <title>Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103025#M28842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Complete dataset A has 100 observations.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Subset dataset B has 87 observations.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Which observations of A are not in B?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Either create a new dataset "Missing Observations", or write the answer to log, and save log to the current library.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Is a prior sort of both datasets necessary?&amp;nbsp; Bare in mind that strict observation-to-observation comparison will not line up, as some (13) observations are missing from dataset B.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Nicholas Kormanik&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 23:42:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103025#M28842</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2013-02-07T23:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103026#M28843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look up SQL Exists Condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473688.htm" title="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473688.htm"&gt;Base SAS(R) 9.2 Procedures Guide&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 00:38:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103026#M28843</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-08T00:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103027#M28844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You have to sort both datasets if you use data step:&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt; input id @@;&lt;/P&gt;&lt;P&gt; cards;&lt;/P&gt;&lt;P&gt; 1 2 3 4 5 6 7 8&lt;/P&gt;&lt;P&gt; ;&lt;/P&gt;&lt;P&gt; data b;&lt;/P&gt;&lt;P&gt; input id @@;&lt;/P&gt;&lt;P&gt; cards;&lt;/P&gt;&lt;P&gt; 2 4 6 8&lt;/P&gt;&lt;P&gt; ;&lt;/P&gt;&lt;P&gt; proc sort data=a;by id;run;&lt;/P&gt;&lt;P&gt; proc sort data=b;by id;run;&lt;/P&gt;&lt;P&gt; data missing;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; merge a(in=aa) b(in=bb);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by id;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if aa and not bb;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc print;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 01:25:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103027#M28844</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2013-02-08T01:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103028#M28845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I have used SQL merging here and it does not require prior sorting . Please find below the code for your reference.&lt;/P&gt;&lt;P&gt;==============================================&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;input id @@;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 2 3 4 5 6 7 8&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data b;&lt;/P&gt;&lt;P&gt;input id @@;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;2 4 6 8&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table missing as select * from a where a.id not in (select id from b);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=missing;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;===================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Daman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 07:28:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103028#M28845</guid>
      <dc:creator>damanaulakh88</dc:creator>
      <dc:date>2013-02-08T07:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103029#M28846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="GRnoSuggestion GRcorrect"&gt;Linlin&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where &lt;SPAN class="GRcorrect"&gt;does the aa and bb come&lt;/SPAN&gt; from?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code so far (assume both sorted):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;data&lt;/SPAN&gt; missing;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;merge&lt;/SPAN&gt; complete&lt;SPAN class="GRcorrect"&gt;(&lt;/SPAN&gt;in=aa) subset&lt;SPAN class="GRcorrect"&gt;(&lt;/SPAN&gt;in=bb);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;by&lt;/SPAN&gt; combo;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;if&lt;/SPAN&gt; &lt;SPAN class="GRcorrect"&gt;aa&lt;/SPAN&gt; and not &lt;SPAN class="GRcorrect"&gt;bb&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;run&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above case, are we only comparing the one variable -- combo -- and not worrying about whether the others are the same or not?&amp;nbsp; If so, that is fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 07:40:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103029#M28846</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2013-02-08T07:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103030#M28847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-style: inherit; font-size: 15.333333015441895px; font-family: inherit;"&gt;&lt;SPAN class="GingerNoCheckStart"&gt;&lt;/SPAN&gt;Damanaulakh88 and Reeza,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-style: inherit; font-size: 15.333333015441895px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-style: inherit; font-size: 15.333333015441895px; font-family: inherit;"&gt;Thanks for trying to help with SQL, but I'm not following how &lt;SPAN class="GRcorrect"&gt;to do&lt;/SPAN&gt; it.&amp;nbsp; I need the actual code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-style: inherit; font-size: 15.333333015441895px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-style: inherit; font-size: 15.333333015441895px; font-family: inherit;"&gt;Files:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-style: inherit; font-size: 15.333333015441895px; font-family: inherit;"&gt;Complete&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-style: inherit; font-size: 15.333333015441895px; font-family: inherit;"&gt;Subset&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-style: inherit; font-size: 15.333333015441895px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-style: inherit; font-size: 15.333333015441895px; font-family: inherit;"&gt;&lt;SPAN class="GRcorrect"&gt;First main variable&lt;/SPAN&gt; used for comparing:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-style: inherit; font-size: 15.333333015441895px; font-family: inherit;"&gt;Combo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-style: inherit; font-size: 15.333333015441895px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-style: inherit; font-size: 15.333333015441895px; font-family: inherit;"&gt;Output file with &lt;SPAN class="GRcorrect"&gt;difference&lt;/SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-style: inherit; font-size: 15.333333015441895px; font-family: inherit;"&gt;Missing&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 07:46:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103030#M28847</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2013-02-08T07:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103031#M28848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="GingerNoCheckStart"&gt;&lt;/SPAN&gt;&lt;SPAN class="GingerNoCheckStart"&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;Is this the way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN class="GRcorrect"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="GRcorrect"&gt;sql&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN class="GRcorrect"&gt;create&lt;/SPAN&gt; table missing as select * from subset where subset.combo not in (select combo from complete);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN class="GRcorrect"&gt;quit&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 07:52:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103031#M28848</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2013-02-08T07:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103032#M28849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the right code to find out the missing ids:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: inherit;"&gt;&lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;sql&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: inherit;"&gt;&lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;create&lt;/SPAN&gt; table missing as select * from complete where complete.id not in (select id from subset);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: inherit;"&gt;&lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;quit&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: inherit;"&gt;/Daman&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 08:27:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103032#M28849</guid>
      <dc:creator>damanaulakh88</dc:creator>
      <dc:date>2013-02-08T08:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103033#M28850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it to work following Linlin's suggestion.&amp;nbsp; Thanks much, Linlin.&amp;nbsp; The "aa" and "&lt;SPAN class="GRcorrect"&gt;bb&lt;/SPAN&gt;" can be anything, doesn't matter, just markers of sorts.&amp;nbsp; Here's the code that worked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;proc&lt;/SPAN&gt; sort data=nicholas.complete;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;by&lt;/SPAN&gt; combo;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;run&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;proc&lt;/SPAN&gt; sort data=nicholas&lt;SPAN class="GRcorrect"&gt;.&lt;/SPAN&gt;subset;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;by&lt;/SPAN&gt; combo;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;run&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;data&lt;/SPAN&gt; &lt;SPAN class="GRcorrect"&gt;nicholas&lt;/SPAN&gt;&lt;SPAN class="GRcorrect"&gt;.&lt;/SPAN&gt;missing;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;merge&lt;/SPAN&gt; nicholas.complete(in=aa) &lt;SPAN class="GRcorrect"&gt;nicholas&lt;/SPAN&gt;&lt;SPAN class="GRcorrect"&gt;.&lt;/SPAN&gt;subset&lt;SPAN class="GRcorrect"&gt;(&lt;/SPAN&gt;in=bb);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;by&lt;/SPAN&gt; combo;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;if&lt;/SPAN&gt; &lt;SPAN class="GRcorrect"&gt;aa&lt;/SPAN&gt; and not &lt;SPAN class="GRcorrect"&gt;bb&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;run&lt;/SPAN&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 08:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103033#M28850</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2013-02-08T08:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103034#M28851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still get an error when I run your code.&amp;nbsp; Might be the "id" part?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the code I ran:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="GRcorrect"&gt;sql&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;create&lt;/SPAN&gt; table &lt;SPAN class="GRcorrect"&gt;nicholas&lt;/SPAN&gt;&lt;SPAN class="GRcorrect"&gt;.&lt;/SPAN&gt;missing &lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;as&lt;/SPAN&gt; select * &lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;from&lt;/SPAN&gt; nicholas.complete &lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;where&lt;/SPAN&gt; nicholas.complete.id not in &lt;/P&gt;&lt;P&gt;(&lt;SPAN class="GRcorrect"&gt;select&lt;/SPAN&gt; id from &lt;SPAN class="GRcorrect"&gt;nicholas&lt;/SPAN&gt;&lt;SPAN class="GRcorrect"&gt;.&lt;/SPAN&gt;subset);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;quit&lt;/SPAN&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 08:55:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103034#M28851</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2013-02-08T08:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103035#M28852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I am able to run this code at my end very fine. &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;sql&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;create&lt;/SPAN&gt; table &lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;nicholas&lt;/SPAN&gt;&lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;missing&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;as&lt;/SPAN&gt; select *&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;from&lt;/SPAN&gt; nicholas.complete&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;where&lt;/SPAN&gt; nicholas.complete.id not in&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;(&lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;select&lt;/SPAN&gt; id from &lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;nicholas&lt;/SPAN&gt;&lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;subset);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN class="GRcorrect" style="font-style: inherit; font-family: inherit;"&gt;quit&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Here:-&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Nicolas is the libref &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Complete and Subset are the datasets.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Id is the variable on which you want to reomve your data.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;If this is the data at your end then above code is fine.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;And also the query you mentioned "&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px; background-color: #ffffff;"&gt;Is a prior sort of both datasets necessary?&lt;/SPAN&gt;" . So its answer is "NO" . We can use the PROC SQL merging method as described above,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;/Daman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 12:22:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103035#M28852</guid>
      <dc:creator>damanaulakh88</dc:creator>
      <dc:date>2013-02-08T12:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103036#M28853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I switch "combo" (the actual variable name ) for "id"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still comes up with an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="GRnoSuggestion GRcorrect"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="GRcorrect"&gt;sql&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp; create table &lt;SPAN class="GRcorrect"&gt;nicholas&lt;/SPAN&gt;&lt;SPAN class="GRcorrect"&gt;.&lt;/SPAN&gt;missing&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp; as select *&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp; from nicholas.complete&lt;/P&gt;&lt;P&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp; where nicholas.complete.combo not in&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 76&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, !, !!, &amp;amp;, *, **, +, -, /, &amp;lt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, EXCEPT, GE, GET, GROUP,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GT, GTT, HAVING, IN, INTERSECT, IS, LE, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OR, ORDER, OUTER, UNION, ^, ^=, |, ||, ~, ~=.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 23:36:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103036#M28853</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2013-02-08T23:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103037#M28854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try the code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table nicholas.missing&lt;/P&gt;&lt;P&gt;as select *&lt;/P&gt;&lt;P&gt;from nicholas.complete &lt;SPAN style="color: #ff0000;"&gt;as a&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;where &lt;SPAN style="color: #ff0000;"&gt;a&lt;/SPAN&gt;.combo not in&lt;/P&gt;&lt;P&gt;(select combo from nicholas.subset);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2013 00:10:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103037#M28854</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2013-02-09T00:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103038#M28855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once again, Linlin performs her magic.&amp;nbsp; Big hugs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As before (your other solution above), though, would you please say what's up with "a".&amp;nbsp; Is that, too, simply some marker, and can be replaced by anything??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the SQL code that works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="GRcorrect"&gt;sql&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;create&lt;/SPAN&gt; table &lt;SPAN class="GRcorrect"&gt;nicholas&lt;/SPAN&gt;&lt;SPAN class="GRcorrect"&gt;.&lt;/SPAN&gt;missing&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;as&lt;/SPAN&gt; select *&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;from&lt;/SPAN&gt; nicholas.complete as a&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;where&lt;/SPAN&gt; a.combo not in&lt;/P&gt;&lt;P&gt;(&lt;SPAN class="GRcorrect"&gt;select&lt;/SPAN&gt; combo from &lt;SPAN class="GRcorrect"&gt;nicholas&lt;/SPAN&gt;&lt;SPAN class="GRcorrect"&gt;.&lt;/SPAN&gt;subset);&lt;/P&gt;&lt;P&gt;&lt;SPAN class="GRcorrect"&gt;quit&lt;/SPAN&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2013 00:42:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103038#M28855</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2013-02-09T00:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Whole Dataset, Subset of Dataset, Which Observations Missing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103039#M28856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;"a" is just an alias of dataset nicholas.comlete. You don't have to use "a". You can replace it with anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best of luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2013 01:05:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Whole-Dataset-Subset-of-Dataset-Which-Observations-Missing/m-p/103039#M28856</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2013-02-09T01:05:36Z</dc:date>
    </item>
  </channel>
</rss>

