<?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 How to retain unique obser and delete repeated obser in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-retain-unique-obser-and-delete-repeated-obser/m-p/112282#M10087</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two datasets:&lt;/P&gt;&lt;P&gt;Set A: Michael, Rahul, Dalton, Barb....................1020 observations&lt;/P&gt;&lt;P&gt;Set B: Disouza, Michael, Glory, Victoria, Daniel, Chip...............200 observations&lt;/P&gt;&lt;P&gt;Desired:&lt;/P&gt;&lt;P&gt;Set A: Michael, rahul, dalton, barb....................1020 observations&lt;/P&gt;&lt;P&gt;Set B: Disouza, Glory, Victoria, Daniel, Chip,...........200 or less observa&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to have unique names in set B. i.e., If names from set A are repeated in set B, I have to remove them. At the end, I need unique observations in Set B (&lt;STRONG&gt;200 or less but not more&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;What I did:&amp;nbsp; I sorted the two files by name and then merged them by first name. Then I used the nodupkey and dupout to separate the repeated observations. But I couldn't create the same set B. My new set B has values from set A too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any kind of help would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Jun 2013 16:41:14 GMT</pubDate>
    <dc:creator>sirisha</dc:creator>
    <dc:date>2013-06-19T16:41:14Z</dc:date>
    <item>
      <title>How to retain unique obser and delete repeated obser</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-retain-unique-obser-and-delete-repeated-obser/m-p/112282#M10087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two datasets:&lt;/P&gt;&lt;P&gt;Set A: Michael, Rahul, Dalton, Barb....................1020 observations&lt;/P&gt;&lt;P&gt;Set B: Disouza, Michael, Glory, Victoria, Daniel, Chip...............200 observations&lt;/P&gt;&lt;P&gt;Desired:&lt;/P&gt;&lt;P&gt;Set A: Michael, rahul, dalton, barb....................1020 observations&lt;/P&gt;&lt;P&gt;Set B: Disouza, Glory, Victoria, Daniel, Chip,...........200 or less observa&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to have unique names in set B. i.e., If names from set A are repeated in set B, I have to remove them. At the end, I need unique observations in Set B (&lt;STRONG&gt;200 or less but not more&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;What I did:&amp;nbsp; I sorted the two files by name and then merged them by first name. Then I used the nodupkey and dupout to separate the repeated observations. But I couldn't create the same set B. My new set B has values from set A too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any kind of help would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jun 2013 16:41:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-retain-unique-obser-and-delete-repeated-obser/m-p/112282#M10087</guid>
      <dc:creator>sirisha</dc:creator>
      <dc:date>2013-06-19T16:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to retain unique obser and delete repeated obser</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-retain-unique-obser-and-delete-repeated-obser/m-p/112283#M10088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to be more clear in your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is your data in columns or rows?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post a small example of what you have and what you want and any code you've tried and WHY it didn't work. &lt;/P&gt;&lt;P&gt;How does case affect your data? Is Rahul the same as rahul? SAS comparisons are case sensitive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From what you have my suggestion would be a proc sql with a where not in.&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 want as&lt;/P&gt;&lt;P&gt;select * from a&lt;/P&gt;&lt;P&gt;where name not in (select name from table b);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also try a datastep merge and use something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;merge have1 (in=a) have2(in=b);&lt;/P&gt;&lt;P&gt;by name;&lt;/P&gt;&lt;P&gt;if b and not a;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jun 2013 17:07:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-retain-unique-obser-and-delete-repeated-obser/m-p/112283#M10088</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-06-19T17:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to retain unique obser and delete repeated obser</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-retain-unique-obser-and-delete-repeated-obser/m-p/112284#M10089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reeza,&lt;/P&gt;&lt;P&gt;My data is in Excel sheets. Each sheet has 50 variables. Two excel sheets have just the variable name in common. Rest of the variables are company, work phone, personal phone, marrital status, so on...&lt;/P&gt;&lt;P&gt;And the data is not case sensitive. All names start with capital letter and continue with regular case. I am trying your code and I will return to you in about 10 min with sample dataset, if that code doesn't work.&lt;/P&gt;&lt;P&gt;Thank you for your prompt response&lt;/P&gt;&lt;P&gt;Sireesha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jun 2013 17:26:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-retain-unique-obser-and-delete-repeated-obser/m-p/112284#M10089</guid>
      <dc:creator>sirisha</dc:creator>
      <dc:date>2013-06-19T17:26:29Z</dc:date>
    </item>
  </channel>
</rss>

