<?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: Identify data dups in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754727#M238071</link>
    <description>How do you know 'Patsy' and 'Pat' are the same person ?</description>
    <pubDate>Sat, 17 Jul 2021 11:07:57 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-07-17T11:07:57Z</dc:date>
    <item>
      <title>Identify data dups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754584#M237987</link>
      <description>I have 3 variables: name, gender, and age. If name is different I want to identify. How can I do?&lt;BR /&gt;Example data input data:&lt;BR /&gt;&lt;BR /&gt;Gender Age Name&lt;BR /&gt;F 2 Patsy&lt;BR /&gt;F 2 Patsy&lt;BR /&gt;F 2 Pat&lt;BR /&gt;M 3 Steve&lt;BR /&gt;&lt;BR /&gt;Desired output:&lt;BR /&gt;Gender Age Name&lt;BR /&gt;F 2 Pat&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you.</description>
      <pubDate>Sat, 17 Jul 2021 10:33:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754584#M237987</guid>
      <dc:creator>Emma2021</dc:creator>
      <dc:date>2021-07-17T10:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Identify data dups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754586#M237988</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input gender $1. age 3. name :$7.;
datalines;
F 2 Patsy
F 2 Patsy
F 2 Pat
M 3 Steve
;
run;

proc sort data = have;
	by name;
run;

data want;
	set have;
	by name;
		if first.name then counter = 1;
			else counter + 1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;Obs 	gender 	age 	name 	counter
1 	F 	2 	Pat 	1
2 	F 	2 	Patsy 	1
3 	F 	2 	Patsy 	2
4 	M 	3 	Steve 	1&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Jul 2021 13:40:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754586#M237988</guid>
      <dc:creator>maguiremq</dc:creator>
      <dc:date>2021-07-16T13:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Identify data dups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754590#M237991</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=have;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;by&amp;nbsp;name;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data&amp;nbsp;have2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;set&amp;nbsp;have;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;by&amp;nbsp;name;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;if&amp;nbsp;first.name&amp;nbsp;ne&amp;nbsp;last.name&amp;nbsp;then&amp;nbsp;diff_flag=1;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Jul 2021 13:55:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754590#M237991</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-07-16T13:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Identify data dups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754727#M238071</link>
      <description>How do you know 'Patsy' and 'Pat' are the same person ?</description>
      <pubDate>Sat, 17 Jul 2021 11:07:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754727#M238071</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-07-17T11:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Identify data dups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754728#M238072</link>
      <description>Thank you.&lt;BR /&gt;I would like to identify those cases (the same age and gender and different names).&lt;BR /&gt;So the final output can be:&lt;BR /&gt;Either this:&lt;BR /&gt;F 2 Patsy&lt;BR /&gt;&lt;BR /&gt;Or this:&lt;BR /&gt;F 2 Pat&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you.</description>
      <pubDate>Sat, 17 Jul 2021 11:11:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754728#M238072</guid>
      <dc:creator>Emma2021</dc:creator>
      <dc:date>2021-07-17T11:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Identify data dups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754830#M238118</link>
      <description>What if data like this :&lt;BR /&gt;&lt;BR /&gt;F 2 Patsy&lt;BR /&gt;F 2 Patsy&lt;BR /&gt;F 2 Pat&lt;BR /&gt;F 2 Patrick&lt;BR /&gt;F 2 Patrick</description>
      <pubDate>Sun, 18 Jul 2021 10:16:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754830#M238118</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-07-18T10:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Identify data dups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754832#M238120</link>
      <description>Thank you.&lt;BR /&gt;Then the output should be one of those 3 names.</description>
      <pubDate>Sun, 18 Jul 2021 11:43:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754832#M238120</guid>
      <dc:creator>Emma2021</dc:creator>
      <dc:date>2021-07-18T11:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Identify data dups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754847#M238134</link>
      <description>&lt;P&gt;Which one though? Does it matter? You don't specify.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Jul 2021 13:27:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754847#M238134</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-07-18T13:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Identify data dups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754849#M238136</link>
      <description>It does not matter which one—thank you so much!</description>
      <pubDate>Sun, 18 Jul 2021 13:34:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-data-dups/m-p/754849#M238136</guid>
      <dc:creator>Emma2021</dc:creator>
      <dc:date>2021-07-18T13:34:03Z</dc:date>
    </item>
  </channel>
</rss>

