<?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 only need those clamnum which are not repeating in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/only-need-those-clamnum-which-are-not-repeating/m-p/811169#M33900</link>
    <description>&lt;P&gt;data have;&lt;/P&gt;
&lt;P&gt;input clamnum&amp;nbsp; sno;&lt;/P&gt;
&lt;P&gt;datalines;&lt;/P&gt;
&lt;P&gt;900001 1&lt;/P&gt;
&lt;P&gt;900001&amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;900002&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;900003&amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;900003&amp;nbsp; 5&lt;/P&gt;
&lt;P&gt;900008&amp;nbsp; 6&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;input clamnum&amp;nbsp; sno;&lt;/P&gt;
&lt;P&gt;datalines;&lt;/P&gt;
&lt;P&gt;900002&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;900008&amp;nbsp; 6&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 May 2022 07:12:35 GMT</pubDate>
    <dc:creator>aanan1417</dc:creator>
    <dc:date>2022-05-03T07:12:35Z</dc:date>
    <item>
      <title>only need those clamnum which are not repeating</title>
      <link>https://communities.sas.com/t5/New-SAS-User/only-need-those-clamnum-which-are-not-repeating/m-p/811169#M33900</link>
      <description>&lt;P&gt;data have;&lt;/P&gt;
&lt;P&gt;input clamnum&amp;nbsp; sno;&lt;/P&gt;
&lt;P&gt;datalines;&lt;/P&gt;
&lt;P&gt;900001 1&lt;/P&gt;
&lt;P&gt;900001&amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;900002&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;900003&amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;900003&amp;nbsp; 5&lt;/P&gt;
&lt;P&gt;900008&amp;nbsp; 6&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;input clamnum&amp;nbsp; sno;&lt;/P&gt;
&lt;P&gt;datalines;&lt;/P&gt;
&lt;P&gt;900002&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;900008&amp;nbsp; 6&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 07:12:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/only-need-those-clamnum-which-are-not-repeating/m-p/811169#M33900</guid>
      <dc:creator>aanan1417</dc:creator>
      <dc:date>2022-05-03T07:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: only need those clamnum which are not repeating</title>
      <link>https://communities.sas.com/t5/New-SAS-User/only-need-those-clamnum-which-are-not-repeating/m-p/811171#M33901</link>
      <description>&lt;P&gt;Not tested:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=have out=sorted;
  by clamnum;
run;

data want;
  set sorted;
  by clamnum;

  if first.clamnum and last.clamnum;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Docs: &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrcon/n01a08zkzy5igbn173zjz82zsi1s.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrcon/n01a08zkzy5igbn173zjz82zsi1s.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 08:08:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/only-need-those-clamnum-which-are-not-repeating/m-p/811171#M33901</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-05-03T08:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: only need those clamnum which are not repeating</title>
      <link>https://communities.sas.com/t5/New-SAS-User/only-need-those-clamnum-which-are-not-repeating/m-p/811207#M33902</link>
      <description>&lt;P&gt;You can create the subset directly from PROC SORT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
   input clamnum  sno;
   datalines;
900001 1
900001  2
900002  3
900003  4
900003  5
900008  6
;
run;

proc sort nounikey data=have out=dups uniout=unique;
   by clamnum;
   run;
proc print data=unique;
   run;
proc print data=dups;
   run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 May 2022 13:21:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/only-need-those-clamnum-which-are-not-repeating/m-p/811207#M33902</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2022-05-03T13:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: only need those clamnum which are not repeating</title>
      <link>https://communities.sas.com/t5/New-SAS-User/only-need-those-clamnum-which-are-not-repeating/m-p/811369#M33910</link>
      <description>&lt;P&gt;Interesting, i have never seen the options "nounikey" ... will have to memorise it.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 06:01:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/only-need-those-clamnum-which-are-not-repeating/m-p/811369#M33910</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-05-04T06:01:30Z</dc:date>
    </item>
  </channel>
</rss>

