<?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: base sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/base-sas/m-p/271919#M54091</link>
    <description>&lt;P&gt;If you're only interested in &lt;EM&gt;how many&lt;/EM&gt; &lt;EM&gt;distinct&lt;/EM&gt;, &lt;EM&gt;non-missing&lt;/EM&gt; SUBJIDs there are in the first dataset and not in the second and vice versa:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select count(subjid) as only_in_tab1
from ((select subjid from tab1)
      except
      (select subjid from tab2));

select count(subjid) as only_in_tab2
from ((select subjid from tab2)
      except
      (select subjid from tab1));
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 20 May 2016 08:28:25 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2016-05-20T08:28:25Z</dc:date>
    <item>
      <title>base sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/base-sas/m-p/271845#M54078</link>
      <description>&lt;P&gt;Dear ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ihave two large SDTM data sets. I need to find the number of subjid which are present in one datset and not in other dataset and viceversa. Is there any code that I can use.Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 21:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/base-sas/m-p/271845#M54078</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-05-19T21:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: base sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/base-sas/m-p/271854#M54080</link>
      <description>&lt;P&gt;If you can index your tables by subjid, you can then do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

data WANT;
  merge TAB1(keep=SUBJID in=A) 
             TAB2(keep=SUBJID in=B);
  by SUBJID;
  if first.SUBJID and not(A and B);
  if A then SOURCE='TAB1'; else SOURCE='TAB2';
run;


 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 May 2016 22:30:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/base-sas/m-p/271854#M54080</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-05-19T22:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: base sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/base-sas/m-p/271880#M54083</link>
      <description>&lt;P&gt;Or use SQL&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
select "TAB1" as source, subjid from TAB1 where subjid not in (select subjid from TAB2)
union all
select "TAB2" as source, subjid from TAB2 where subjid not in (select subjid from TAB1);
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 May 2016 02:42:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/base-sas/m-p/271880#M54083</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-05-20T02:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: base sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/base-sas/m-p/271919#M54091</link>
      <description>&lt;P&gt;If you're only interested in &lt;EM&gt;how many&lt;/EM&gt; &lt;EM&gt;distinct&lt;/EM&gt;, &lt;EM&gt;non-missing&lt;/EM&gt; SUBJIDs there are in the first dataset and not in the second and vice versa:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select count(subjid) as only_in_tab1
from ((select subjid from tab1)
      except
      (select subjid from tab2));

select count(subjid) as only_in_tab2
from ((select subjid from tab2)
      except
      (select subjid from tab1));
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 May 2016 08:28:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/base-sas/m-p/271919#M54091</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-05-20T08:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: base sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/base-sas/m-p/273067#M54383</link>
      <description>&lt;P&gt;Thank you all&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 16:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/base-sas/m-p/273067#M54383</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-05-25T16:26:13Z</dc:date>
    </item>
  </channel>
</rss>

