<?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 with NODUPRECS option not working in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815040#M40766</link>
    <description>Show the log as well.</description>
    <pubDate>Wed, 25 May 2022 15:58:09 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2022-05-25T15:58:09Z</dc:date>
    <item>
      <title>Proc sort with NODUPRECS option not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815039#M40765</link>
      <description>&lt;P&gt;I've got a table named test_1 :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;DATE_1&lt;/TD&gt;&lt;TD&gt;DATE_2&lt;/TD&gt;&lt;TD&gt;nb_1&lt;/TD&gt;&lt;TD&gt;car_1&lt;/TD&gt;&lt;TD&gt;car_2&lt;/TD&gt;&lt;TD&gt;LIB_car_1&lt;/TD&gt;&lt;TD&gt;DATE_3&lt;/TD&gt;&lt;TD&gt;DATE_4&lt;/TD&gt;&lt;TD&gt;sld&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10033762900&lt;/TD&gt;&lt;TD&gt;01Jan1960&lt;/TD&gt;&lt;TD&gt;01Jan1960&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;SNA&lt;/TD&gt;&lt;TD&gt;AMEP&lt;/TD&gt;&lt;TD&gt;Contrat validé&lt;/TD&gt;&lt;TD&gt;16Sep2021&lt;/TD&gt;&lt;TD&gt;16Sep2021&lt;/TD&gt;&lt;TD&gt;42 400,00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10033762900&lt;/TD&gt;&lt;TD&gt;01Jan1960&lt;/TD&gt;&lt;TD&gt;01Jan1960&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;SNA&lt;/TD&gt;&lt;TD&gt;AMEP&lt;/TD&gt;&lt;TD&gt;Contrat validé&lt;/TD&gt;&lt;TD&gt;16Sep2021&lt;/TD&gt;&lt;TD&gt;16Sep2021&lt;/TD&gt;&lt;TD&gt;42 400,00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10033844470&lt;/TD&gt;&lt;TD&gt;01Oct2021&lt;/TD&gt;&lt;TD&gt;30Sep2024&lt;/TD&gt;&lt;TD&gt;36&lt;/TD&gt;&lt;TD&gt;SNA&lt;/TD&gt;&lt;TD&gt;AAML&lt;/TD&gt;&lt;TD&gt;Contrat mis en loyer&lt;/TD&gt;&lt;TD&gt;24Dec2021&lt;/TD&gt;&lt;TD&gt;20Dec2021&lt;/TD&gt;&lt;TD&gt;42 400,00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10033844470&lt;/TD&gt;&lt;TD&gt;01Oct2021&lt;/TD&gt;&lt;TD&gt;30Sep2024&lt;/TD&gt;&lt;TD&gt;36&lt;/TD&gt;&lt;TD&gt;SNA&lt;/TD&gt;&lt;TD&gt;AAML&lt;/TD&gt;&lt;TD&gt;Contrat mis en loyer&lt;/TD&gt;&lt;TD&gt;24Dec2021&lt;/TD&gt;&lt;TD&gt;20Dec2021&lt;/TD&gt;&lt;TD&gt;42 400,00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10033844500&lt;/TD&gt;&lt;TD&gt;14Sep2021&lt;/TD&gt;&lt;TD&gt;13Sep2024&lt;/TD&gt;&lt;TD&gt;36&lt;/TD&gt;&lt;TD&gt;SNA&lt;/TD&gt;&lt;TD&gt;AAML&lt;/TD&gt;&lt;TD&gt;Contrat mis en loyer&lt;/TD&gt;&lt;TD&gt;20Oct2021&lt;/TD&gt;&lt;TD&gt;13Oct2021&lt;/TD&gt;&lt;TD&gt;42 400,00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10033844500&lt;/TD&gt;&lt;TD&gt;14Sep2021&lt;/TD&gt;&lt;TD&gt;13Sep2024&lt;/TD&gt;&lt;TD&gt;36&lt;/TD&gt;&lt;TD&gt;SNA&lt;/TD&gt;&lt;TD&gt;AAML&lt;/TD&gt;&lt;TD&gt;Contrat mis en loyer&lt;/TD&gt;&lt;TD&gt;20Oct2021&lt;/TD&gt;&lt;TD&gt;13Oct2021&lt;/TD&gt;&lt;TD&gt;42 400,00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;I'm running a simple proc sort with NODUPRECS option :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sort data = test_1 NODUPRECS out = data_in dupout = data_out; 
by _ALL_;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The dupout result is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;DATE_1&lt;/TD&gt;&lt;TD&gt;DATE_2&lt;/TD&gt;&lt;TD&gt;nb_1&lt;/TD&gt;&lt;TD&gt;car_1&lt;/TD&gt;&lt;TD&gt;car_2&lt;/TD&gt;&lt;TD&gt;LIB_car_1&lt;/TD&gt;&lt;TD&gt;DATE_3&lt;/TD&gt;&lt;TD&gt;DATE_4&lt;/TD&gt;&lt;TD&gt;sld&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/LI-SPOILER&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;an empty table.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Shouldn't there be three records in the output file? &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 15:50:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815039#M40765</guid>
      <dc:creator>Weezy_bks</dc:creator>
      <dc:date>2022-05-25T15:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sort with NODUPRECS option not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815040#M40766</link>
      <description>Show the log as well.</description>
      <pubDate>Wed, 25 May 2022 15:58:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815040#M40766</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-05-25T15:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sort with NODUPRECS option not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815042#M40767</link>
      <description>&lt;P&gt;What does the LOG show when you run the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that NODUPRECS is no longer documented for Proc Sort. Plus this note from the documentation:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV class="xis-refProc"&gt;
&lt;DIV class="xis-procStatement"&gt;
&lt;DIV class="xis-procStatementSyntax"&gt;
&lt;DIV class="xis-syntaxDescription"&gt;
&lt;DIV class="xis-otherArgGroup"&gt;
&lt;DIV id="p0k9v2soi4rps5n1m8fetjz9o2yr" class="xis-argDescriptionPair"&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;TABLE class="xis-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="xis-summaryText"&gt;The DUPOUT= option can be used only with the NODUPKEY option. It cannot be combined with the NOUNIQUEKEY option.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So try NODUPKEY and see if that gets what you expect.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 16:03:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815042#M40767</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-05-25T16:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sort with NODUPRECS option not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815043#M40768</link>
      <description>&lt;P&gt;Your posted data has duplicates:&lt;/P&gt;
&lt;PRE&gt;557  proc sort data = have nodupkey out = data_in dupout = data_out;
558    by _ALL_;
559  run;

NOTE: There were 6 observations read from the data set WORK.HAVE.
NOTE: 3 observations with duplicate key values were deleted.
NOTE: The data set WORK.DATA_IN has 3 observations and 10 variables.
NOTE: The data set WORK.DATA_OUT has 3 observations and 10 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;Most likely your real data is different in some slight way that is not visible in the printout you posted.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example try this dataset where a fractional part of a day is added to one of the date variables.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  infile cards dsd dlm='|' truncover;
  input ID :$15. (DATE_1 DATE_2) (:date.) nb_1 car_1 $ car_2 $ LIB_car_1 :$30. (DATE_3 DATE_4) (:date.)
     sld :commax. 
  ;
  format date_1-date_4 date9.;
  date_1 + (_n_)/100 ;
cards;
10033762900|01Jan1960|01Jan1960|0|SNA|AMEP|Contrat validé|16Sep2021|16Sep2021|42 400,00
10033844470|01Oct2021|30Sep2024|36|SNA|AAML|Contrat mis en loyer|24Dec2021|20Dec2021|42 400,00
10033762900|01Jan1960|01Jan1960|0|SNA|AMEP|Contrat validé|16Sep2021|16Sep2021|42 400,00
10033844500|14Sep2021|13Sep2024|36|SNA|AAML|Contrat mis en loyer|20Oct2021|13Oct2021|42 400,00
10033844470|01Oct2021|30Sep2024|36|SNA|AAML|Contrat mis en loyer|24Dec2021|20Dec2021|42 400,00
10033844500|14Sep2021|13Sep2024|36|SNA|AAML|Contrat mis en loyer|20Oct2021|13Oct2021|42 400,00
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Results:&lt;/P&gt;
&lt;PRE&gt;595  proc sort data = have nodupkey out = data_in dupout = data_out;
596    by _ALL_;
597  run;

NOTE: There were 6 observations read from the data set WORK.HAVE.
NOTE: 0 observations with duplicate key values were deleted.
NOTE: The data set WORK.DATA_IN has 6 observations and 10 variables.
NOTE: The data set WORK.DATA_OUT has 0 observations and 10 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 May 2022 16:10:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815043#M40768</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-05-25T16:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sort with NODUPRECS option not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815049#M40770</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;What does the LOG show when you run the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that NODUPRECS is no longer documented for Proc Sort. Plus this note from the documentation:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV class="xis-refProc"&gt;
&lt;DIV class="xis-procStatement"&gt;
&lt;DIV class="xis-procStatementSyntax"&gt;
&lt;DIV class="xis-syntaxDescription"&gt;
&lt;DIV class="xis-otherArgGroup"&gt;
&lt;DIV id="p0k9v2soi4rps5n1m8fetjz9o2yr" class="xis-argDescriptionPair"&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;TABLE class="xis-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="xis-summaryText"&gt;The DUPOUT= option can be used only with the NODUPKEY option. It cannot be combined with the NOUNIQUEKEY option.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So try NODUPKEY and see if that gets what you expect.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Good point.&amp;nbsp; NODUPRECS does not do what most people expect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BUT in this case since the code is using BY _ALL_ it means that NODUPRECS and NODUPKEY will do the same thing.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 16:49:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815049#M40770</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-05-25T16:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sort with NODUPRECS option not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815394#M40778</link>
      <description>&lt;PRE&gt;30         options obs=max;
31         options compress=yes;
32         
33         
34         proc sort data = test_1 NODUPRECS out = data_in dupout = data_out;
35         by _ALL_;
36         run;

NOTE: There were 6 observations read from the data set WORK.TEST_1.
NOTE: 0 duplicate observations were deleted.
NOTE: The data set WORK.DATA_IN has 6 observations and 21 variables.
NOTE: Compressing data set WORK.DATA_IN increased size by 100.00 percent. 
      Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: The data set WORK.DATA_OUT has 0 observations and 21 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 May 2022 12:49:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815394#M40778</guid>
      <dc:creator>Weezy_bks</dc:creator>
      <dc:date>2022-05-27T12:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sort with NODUPRECS option not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815397#M40779</link>
      <description>log with NODUPRECS option :&lt;BR /&gt;&lt;BR /&gt;30 options obs=max;&lt;BR /&gt;31 options compress=yes;&lt;BR /&gt;32&lt;BR /&gt;33&lt;BR /&gt;34 proc sort data = test_1 NODUPRECS out = data_in dupout = data_out;&lt;BR /&gt;35 by _ALL_;&lt;BR /&gt;36 run;&lt;BR /&gt;&lt;BR /&gt;NOTE: There were 6 observations read from the data set WORK.TEST_1.&lt;BR /&gt;NOTE: 0 duplicate observations were deleted.&lt;BR /&gt;NOTE: The data set WORK.DATA_IN has 6 observations and 21 variables.&lt;BR /&gt;NOTE: Compressing data set WORK.DATA_IN increased size by 100.00 percent.&lt;BR /&gt;Compressed is 2 pages; un-compressed would require 1 pages.&lt;BR /&gt;NOTE: The data set WORK.DATA_OUT has 0 observations and 21 variables.&lt;BR /&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;BR /&gt;&lt;BR /&gt;by replacing NODUPRECS by NODUPKEY :&lt;BR /&gt;&lt;BR /&gt;options obs=max;&lt;BR /&gt;31 options compress=yes;&lt;BR /&gt;32&lt;BR /&gt;33&lt;BR /&gt;34 proc sort data = test_1 nodupkey out = data_in dupout = data_out;&lt;BR /&gt;35 by _ALL_;&lt;BR /&gt;36 run;&lt;BR /&gt;&lt;BR /&gt;NOTE: There were 6 observations read from the data set WORK.TEST_1.&lt;BR /&gt;NOTE: 0 observations with duplicate key values were deleted.&lt;BR /&gt;NOTE: The data set WORK.DATA_IN has 6 observations and 21 variables.&lt;BR /&gt;NOTE: Compressing data set WORK.DATA_IN increased size by 100.00 percent.&lt;BR /&gt;Compressed is 2 pages; un-compressed would require 1 pages.&lt;BR /&gt;NOTE: The data set WORK.DATA_OUT has 0 observations and 21 variables.&lt;BR /&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.00 seconds</description>
      <pubDate>Fri, 27 May 2022 12:53:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815397#M40779</guid>
      <dc:creator>Weezy_bks</dc:creator>
      <dc:date>2022-05-27T12:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sort with NODUPRECS option not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815402#M40780</link>
      <description>Do you have a solution to avoid this?&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Fri, 27 May 2022 12:58:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815402#M40780</guid>
      <dc:creator>Weezy_bks</dc:creator>
      <dc:date>2022-05-27T12:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sort with NODUPRECS option not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815403#M40781</link>
      <description>I have the same result with NODUPKEY</description>
      <pubDate>Fri, 27 May 2022 13:02:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815403#M40781</guid>
      <dc:creator>Weezy_bks</dc:creator>
      <dc:date>2022-05-27T13:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sort with NODUPRECS option not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815406#M40783</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/426120"&gt;@Weezy_bks&lt;/a&gt;, for showing the logs. Now let us look at the data "with SAS's eyes" so as to understand &lt;EM&gt;why&lt;/EM&gt; SAS doesn't find any duplicates (and to make the slight differences visible that Tom mentioned). Please show us the output of this PROC PRINT step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=test_1 width=min;
format _numeric_ hex16. _char_ $hex40.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 May 2022 13:10:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815406#M40783</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-05-27T13:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sort with NODUPRECS option not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815411#M40784</link>
      <description>&lt;P&gt;Avoid what?&lt;/P&gt;
&lt;P&gt;Your actual data does not have duplicates.&lt;/P&gt;
&lt;P&gt;You can check which variables are the issue by experimenting with using the DROP= dataset option to eliminate some of the variables from the input.&lt;/P&gt;
&lt;P&gt;So for example if did&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=have(drop=num1) nodupkey out=nodups;
  by _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And now some duplicates are dropped then it was NUM1 that was the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the issue is with a numeric variable (date variables are numeric) and the variables have fractional values then perhaps the differences are below the level of precision you can see in the printout.&amp;nbsp; So use the ROUND() function.&amp;nbsp; For example if you only care about the values to two decimal places you could do:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data clean;
  set have;
  num1 = round(num1,0.01);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And then try your sort nodupkey on the new cleaned up dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the variable that is causing non-duplicates is character then perhaps you have non-visible character differences.&amp;nbsp; Such as tabs, linefeeds, non-breaking spaces.&amp;nbsp; Or perhaps the format width is shorter than the variable length so the full values are not printing.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 13:41:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815411#M40784</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-05-27T13:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sort with NODUPRECS option not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815475#M40785</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/426120"&gt;@Weezy_bks&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;log with NODUPRECS option :&lt;BR /&gt;&lt;BR /&gt;30 options obs=max;&lt;BR /&gt;31 options compress=yes;&lt;BR /&gt;32&lt;BR /&gt;33&lt;BR /&gt;34 proc sort data = test_1 NODUPRECS out = data_in dupout = data_out;&lt;BR /&gt;35 by _ALL_;&lt;BR /&gt;36 run;&lt;BR /&gt;&lt;BR /&gt;NOTE: There were 6 observations read from the data set WORK.TEST_1.&lt;BR /&gt;NOTE: 0 duplicate observations were deleted.&lt;BR /&gt;NOTE: The data set WORK.DATA_IN has 6 observations and 21 variables.&lt;BR /&gt;NOTE: Compressing data set WORK.DATA_IN increased size by 100.00 percent.&lt;BR /&gt;Compressed is 2 pages; un-compressed would require 1 pages.&lt;BR /&gt;NOTE: The data set WORK.DATA_OUT has 0 observations and 21 variables.&lt;BR /&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;BR /&gt;&lt;BR /&gt;by replacing NODUPRECS by NODUPKEY :&lt;BR /&gt;&lt;BR /&gt;options obs=max;&lt;BR /&gt;31 options compress=yes;&lt;BR /&gt;32&lt;BR /&gt;33&lt;BR /&gt;34 proc sort data = test_1 nodupkey out = data_in dupout = data_out;&lt;BR /&gt;35 by _ALL_;&lt;BR /&gt;36 run;&lt;BR /&gt;&lt;BR /&gt;NOTE: There were 6 observations read from the data set WORK.TEST_1.&lt;BR /&gt;NOTE: 0 observations with duplicate key values were deleted.&lt;BR /&gt;NOTE: The data set WORK.DATA_IN has 6 observations and 21 variables.&lt;BR /&gt;NOTE: Compressing data set WORK.DATA_IN increased size by 100.00 percent.&lt;BR /&gt;Compressed is 2 pages; un-compressed would require 1 pages.&lt;BR /&gt;NOTE: The data set WORK.DATA_OUT has 0 observations and 21 variables.&lt;BR /&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The case is very clear: there are NO duplicates when all 21 variables are considered.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 19:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-sort-with-NODUPRECS-option-not-working/m-p/815475#M40785</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-05-27T19:21:01Z</dc:date>
    </item>
  </channel>
</rss>

