<?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 removing dups in cell in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/removing-dups-in-cell/m-p/239622#M55535</link>
    <description>Hi I have a rows of data an wanted to remove any dups the data looks like this &lt;BR /&gt;&lt;BR /&gt;Machine.                          start 1.                   &lt;BR /&gt;A1.                           11/01/15 12:34:00.    &lt;BR /&gt;                                           Start2&lt;BR /&gt;                                   11/01/15 09:34:00&lt;BR /&gt;                                              Start3.  &lt;BR /&gt;                                    11/01/15 09:34:00&lt;BR /&gt;I don't have room I didn't inlude the end time which would be also duplex ....thanks &lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 16 Dec 2015 20:43:58 GMT</pubDate>
    <dc:creator>BETO</dc:creator>
    <dc:date>2015-12-16T20:43:58Z</dc:date>
    <item>
      <title>removing dups in cell</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/removing-dups-in-cell/m-p/239622#M55535</link>
      <description>Hi I have a rows of data an wanted to remove any dups the data looks like this &lt;BR /&gt;&lt;BR /&gt;Machine.                          start 1.                   &lt;BR /&gt;A1.                           11/01/15 12:34:00.    &lt;BR /&gt;                                           Start2&lt;BR /&gt;                                   11/01/15 09:34:00&lt;BR /&gt;                                              Start3.  &lt;BR /&gt;                                    11/01/15 09:34:00&lt;BR /&gt;I don't have room I didn't inlude the end time which would be also duplex ....thanks &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Dec 2015 20:43:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/removing-dups-in-cell/m-p/239622#M55535</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2015-12-16T20:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: removing dups in cell</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/removing-dups-in-cell/m-p/239624#M55536</link>
      <description>&lt;P&gt;First step would be to read the data into a SAS data set.&amp;nbsp; Once you have done that, show us what it looks like and we'll find a way to get rid of those pesky dups.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 21:09:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/removing-dups-in-cell/m-p/239624#M55536</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-12-16T21:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: removing dups in cell</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/removing-dups-in-cell/m-p/239649#M55543</link>
      <description>&lt;P&gt;It looks some thing like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;machine1. &amp;nbsp; &amp;nbsp; &amp;nbsp; Start1. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;end1. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Machine2. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Start2. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end2. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; Machine3. &amp;nbsp; &amp;nbsp;Start3. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End3&lt;/P&gt;
&lt;P&gt;A1. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11/01/15 11:21. &amp;nbsp; &amp;nbsp; &amp;nbsp;11/01/15 11:38. &amp;nbsp; &amp;nbsp; &amp;nbsp; A1. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;11/01/15 11:30 11/01/15 11:35. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 11/01/15 11:21. 11/01/15 11:38&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sometimes there are up to 5 machines but normally there are 3 what I need is to remove the duplicates and keep one of the two....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 22:37:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/removing-dups-in-cell/m-p/239649#M55543</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2015-12-16T22:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: removing dups in cell</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/removing-dups-in-cell/m-p/239697#M55544</link>
      <description>&lt;P&gt;&lt;SPAN&gt;data want;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;set have;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;array m{*}&amp;nbsp;machine: ;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;array s{*} &lt;SPAN&gt; Start:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;array e{*} &lt;SPAN&gt;end:&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;do i=1 to dim(m);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;ma=m{i};&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;st=s{i};&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;en=e{i};&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;output;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;end;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;drop machine: Start: end:&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc sort data=want nodupkey ; by ma st en; run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 02:35:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/removing-dups-in-cell/m-p/239697#M55544</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-12-17T02:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: removing dups in cell</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/removing-dups-in-cell/m-p/239792#M55556</link>
      <description>Ksharp&lt;BR /&gt;&lt;BR /&gt;I ran syntax  it drop my start 2 end 2 Start3 End3&lt;BR /&gt;&lt;BR /&gt;It put columns  I  ma.  St.  En.   ..I need the output to look like my examples minus the duplicate...the time in St an en is formated 1762078330 .... thanks for your help &lt;BR /&gt;</description>
      <pubDate>Thu, 17 Dec 2015 17:21:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/removing-dups-in-cell/m-p/239792#M55556</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2015-12-17T17:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: removing dups in cell</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/removing-dups-in-cell/m-p/239896#M55560</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input machine1 $ ( Start1   end1) (&amp;amp; anydtdtm.) Machine2 $  (Start2    end2) (&amp;amp; anydtdtm.) Machine3 $   (Start3  End3) (&amp;amp; anydtdtm.);
format _numeric_ datetime.;
cards;                 
A1  11/01/15 11:21  11/01/15 11:38  A1  11/01/15 11:30   11/01/15 11:35   A1   11/01/15 11:21  11/01/15 11:38
A1  11/01/15 11:21  11/01/15 11:38  A1  11/01/15 11:30   11/01/15 11:35   A2   11/01/15 11:21  11/01/15 11:38
;
run;

data want;
if _n_ eq  1 then do;
 length _machine $ 100 _Start _end 8;
 declare hash h();
 declare hiter hi('h');
 h.definekey('_machine','_Start','_end');
 h.definedata('_machine','_Start','_end');
 h.definedone();
end;
 set have;
 array m{*} machine: ;
 array s{*} Start: ;
 array e{*} end: ;
do i=1 to dim(m);
 _machine=m{i};_Start=s{i};_end=e{i};
 h.replace();
end;
call missing(of m{*} s{*} e{*});
i=0;
do while(hi.next()=0);
 i+1;
 m{i}=_machine;s{i}=_Start;e{i}=_end;
end;
h.clear();
drop _: i ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Dec 2015 01:18:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/removing-dups-in-cell/m-p/239896#M55560</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-12-18T01:18:50Z</dc:date>
    </item>
  </channel>
</rss>

