<?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: proc sort nodupkey in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-sort-nodupkey/m-p/755282#M238341</link>
    <description>&lt;P&gt;Please post data in usable form and show the log.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jul 2021 10:11:28 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2021-07-20T10:11:28Z</dc:date>
    <item>
      <title>proc sort nodupkey</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sort-nodupkey/m-p/755280#M238340</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I have a data set with one field and 2 rows.&lt;/P&gt;
&lt;P&gt;In both rows there is same value "601_15013150_10_3021_604E3"&lt;/P&gt;
&lt;P&gt;I am doing proc sort nodupkey and I still get 2 rows!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May anyone help to solve the problem??&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 10:01:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sort-nodupkey/m-p/755280#M238340</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-07-20T10:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: proc sort nodupkey</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sort-nodupkey/m-p/755282#M238341</link>
      <description>&lt;P&gt;Please post data in usable form and show the log.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 10:11:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sort-nodupkey/m-p/755282#M238341</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-07-20T10:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc sort nodupkey</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sort-nodupkey/m-p/755284#M238342</link>
      <description>&lt;P&gt;You don't provide any code nor sample data. Proc Sort Nodupkey just works - see below. If you don't get the expected result then either the data is different or something in your code isn't as it should.&lt;/P&gt;
&lt;P&gt;For the data: Leading blanks or some hidden whitespace characters (characters that don't print) could make the strings different.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input var $20.;
  output;
  output;
  datalines;
601_15013150_10_3021_604E3
;

proc sort data=have out=want nodupkey;
  by var;
run;

proc print data=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1626776209227.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61406i81254D9C15D1BC41/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1626776209227.png" alt="Patrick_0-1626776209227.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 10:16:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sort-nodupkey/m-p/755284#M238342</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-07-20T10:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: proc sort nodupkey</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sort-nodupkey/m-p/755286#M238343</link>
      <description>So the conclusion is to use proc sort nodupkey on numeric fields or on compressed char  (not use it on non compressed chars!!)</description>
      <pubDate>Tue, 20 Jul 2021 10:26:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sort-nodupkey/m-p/755286#M238343</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-07-20T10:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: proc sort nodupkey</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sort-nodupkey/m-p/755288#M238344</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;So the conclusion is to use proc sort nodupkey on numeric fields or on compressed char (not use it on non compressed chars!!)&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;No, that's definitely not the conclusion. It's: "Know your Data".&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 10:36:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sort-nodupkey/m-p/755288#M238344</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-07-20T10:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: proc sort nodupkey</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sort-nodupkey/m-p/755415#M238393</link>
      <description>&lt;P&gt;Yep.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had an analogous behavior of getting "two identical values" (actually more than two, one for each level of a variable).&lt;/P&gt;
&lt;P&gt;Traced it back that the file exported by the source for one of the sites collecting the data were exported as " the value" and "the value" for the others. So somehow one site had values with a leading space inserted into all of its values.&lt;/P&gt;
&lt;P&gt;But the values in SAS are not the same with a leading space. (Actually this is only one of 100's of cases where the data provided does not actually match the provided data dictionary and field descriptions from that source. They don't update the dictionary as often as they change data fields).&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 17:10:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sort-nodupkey/m-p/755415#M238393</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-07-20T17:10:07Z</dc:date>
    </item>
  </channel>
</rss>

