<?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 Repeated Records in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Repeated-Records/m-p/452601#M69829</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm&amp;nbsp;looking for code that can keep records who appeared once in my dataset FDFD,&amp;nbsp; and one appearance&amp;nbsp;for records that repeated more than one time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;my code will be for these variables A, B, C, P, PEAKYIELD, and&amp;nbsp;TmDAYS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;A	                        B	                 C	                P	            peakYield	tmdays
45.50222622	0.155650915	0.134354472	2.319707636	39.84559673	
22.52354346	0.518806327	0.175347086	2.644223471	23.5361343	2.958739376
22.52354346	0.518806327	0.175347086	2.644223471	23.5361343	2.958739376

37.70843347	0.228103848	0.124659053	2.557124486	34.45329026	1.829821767
37.70843347	0.228103848	0.124659053	2.557124486	34.45329026	1.829821767
37.70843347	0.228103848	0.124659053	2.557124486	34.45329026	1.829821767
37.70843347	0.228103848	0.124659053	2.557124486	34.45329026	1.829821767&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Apr 2018 19:00:17 GMT</pubDate>
    <dc:creator>Barkamih</dc:creator>
    <dc:date>2018-04-09T19:00:17Z</dc:date>
    <item>
      <title>Repeated Records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeated-Records/m-p/452601#M69829</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm&amp;nbsp;looking for code that can keep records who appeared once in my dataset FDFD,&amp;nbsp; and one appearance&amp;nbsp;for records that repeated more than one time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;my code will be for these variables A, B, C, P, PEAKYIELD, and&amp;nbsp;TmDAYS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;A	                        B	                 C	                P	            peakYield	tmdays
45.50222622	0.155650915	0.134354472	2.319707636	39.84559673	
22.52354346	0.518806327	0.175347086	2.644223471	23.5361343	2.958739376
22.52354346	0.518806327	0.175347086	2.644223471	23.5361343	2.958739376

37.70843347	0.228103848	0.124659053	2.557124486	34.45329026	1.829821767
37.70843347	0.228103848	0.124659053	2.557124486	34.45329026	1.829821767
37.70843347	0.228103848	0.124659053	2.557124486	34.45329026	1.829821767
37.70843347	0.228103848	0.124659053	2.557124486	34.45329026	1.829821767&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 19:00:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeated-Records/m-p/452601#M69829</guid>
      <dc:creator>Barkamih</dc:creator>
      <dc:date>2018-04-09T19:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Repeated Records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeated-Records/m-p/452604#M69830</link>
      <description>&lt;P&gt;What do you want as output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're either looking at PROC SORT, which can remove duplicates or unique records as desired.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're looking to flag the records you need to use BY group processing, this post has an example with multiple by groups.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://stats.idre.ucla.edu/sas/faq/how-can-i-create-an-enumeration-variable-by-groups/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/faq/how-can-i-create-an-enumeration-variable-by-groups/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please include any code you've tried so far, so we can provide more direction or indicate what you need to change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151600"&gt;@Barkamih&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm&amp;nbsp;looking for that can keep records that appeared once,&amp;nbsp; and appearance&amp;nbsp;for records that repeated more than one time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;my code will be for these variables A, B, C, P, PEAKYIELD&amp;nbsp;ANDTNDAYS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;A	                        B	                 C	                P	            peakYield	tmdays
45.50222622	0.155650915	0.134354472	2.319707636	39.84559673	
22.52354346	0.518806327	0.175347086	2.644223471	23.5361343	2.958739376
22.52354346	0.518806327	0.175347086	2.644223471	23.5361343	2.958739376

37.70843347	0.228103848	0.124659053	2.557124486	34.45329026	1.829821767
37.70843347	0.228103848	0.124659053	2.557124486	34.45329026	1.829821767
37.70843347	0.228103848	0.124659053	2.557124486	34.45329026	1.829821767
37.70843347	0.228103848	0.124659053	2.557124486	34.45329026	1.829821767&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 19:01:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeated-Records/m-p/452604#M69830</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-09T19:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Repeated Records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeated-Records/m-p/452608#M69831</link>
      <description>&lt;P&gt;I did this code but&amp;nbsp; this one has deleted records&amp;nbsp;that app&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data  merged;
 set merged;
 by A B C P PEAKYIELD TMDAYS  notsorted;
 if not first.A then A=.;
 if not first.B then B=.;
 if not first.C then C=.;
 if not first.P then P=.;
 if not first.LOGTM then TMDAYS=.;
 if not first.PEAKYIELD then PEAKYIELD=.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;eared only one time&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 19:07:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeated-Records/m-p/452608#M69831</guid>
      <dc:creator>Barkamih</dc:creator>
      <dc:date>2018-04-09T19:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Repeated Records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeated-Records/m-p/452611#M69832</link>
      <description>&lt;P&gt;&lt;STRONG&gt;What do you want as output?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 19:13:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeated-Records/m-p/452611#M69832</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-09T19:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Repeated Records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Repeated-Records/m-p/452618#M69833</link>
      <description>thank you so much&lt;BR /&gt;I got my code, I was having a simple mistake in my first code&lt;BR /&gt;regards</description>
      <pubDate>Mon, 09 Apr 2018 19:20:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Repeated-Records/m-p/452618#M69833</guid>
      <dc:creator>Barkamih</dc:creator>
      <dc:date>2018-04-09T19:20:38Z</dc:date>
    </item>
  </channel>
</rss>

