<?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: log in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/log/m-p/509205#M136857</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data lb;
input usubjid lbdtc $ 16. lbtptnum rbc $ wbc $ visit;
cards;
101 01-10-2018T10:15 1 1 1 1
101 01-10-2018T10:20 2 2 2 1.01
101 01-10-2018T10:20 2 2 2 1.01
;
run;


proc sort data=lb dupout=want nodupkey;
by _all_;
run;

data _null_;
set want;
put _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 31 Oct 2018 16:47:37 GMT</pubDate>
    <dc:creator>singhsahab</dc:creator>
    <dc:date>2018-10-31T16:47:37Z</dc:date>
    <item>
      <title>log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/log/m-p/509008#M136771</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;i have one dataset i want log as there is a duplicate record tn dataset and that duplicate dataset should be printed in log window.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data lb;
input usubjid lbdtc $ 16. lbtptnum rbc $ wbc $ visit;
cards;
101 01-10-2018T10:15 1 1 1 1
101 01-10-2018T10:20 2 2 2 1.01
101 01-10-2018T10:20 2 2 2 1.01
;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 06:43:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/log/m-p/509008#M136771</guid>
      <dc:creator>ravindra2</dc:creator>
      <dc:date>2018-10-31T06:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/log/m-p/509011#M136774</link>
      <description>&lt;P&gt;I'm not following. You have a duplicate record in your data set. What do you want to be printed in the log? The data set name? The duplicate record?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 06:45:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/log/m-p/509011#M136774</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-10-31T06:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/log/m-p/509014#M136777</link>
      <description>&lt;P&gt;there should be a warning that 'lb dataset having duplicate record'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;next task is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that duplicate record which is there in lb dataset should also have to print in log&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 06:50:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/log/m-p/509014#M136777</guid>
      <dc:creator>ravindra2</dc:creator>
      <dc:date>2018-10-31T06:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/log/m-p/509025#M136780</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/237916"&gt;@ravindra2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;there should be a warning that 'lb dataset having duplicate record'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since that is not a native problem condition for SAS, you have to write code that detects this, eg&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort
  data=have
  out=sort
  dupout=test
  nodupkey
;
by key;
run;

data _null_;
set test;
put 'Duplicate observation detected!';
stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If no duplicates are there, the data step will stop on its own when the set statement encounters the EOF condition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;next task is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;that duplicate record which is there in lb dataset should also have to print in log&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Don't do that. If you apply that to a large dataset, your log file will grow out of proportion, which takes space and time. If you need documentation, use a reference to the dupout dataset (and write that to a permanent library).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Edit: added the nodupkey option in the proc sort statement&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 09:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/log/m-p/509025#M136780</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-10-31T09:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/log/m-p/509205#M136857</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data lb;
input usubjid lbdtc $ 16. lbtptnum rbc $ wbc $ visit;
cards;
101 01-10-2018T10:15 1 1 1 1
101 01-10-2018T10:20 2 2 2 1.01
101 01-10-2018T10:20 2 2 2 1.01
;
run;


proc sort data=lb dupout=want nodupkey;
by _all_;
run;

data _null_;
set want;
put _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Oct 2018 16:47:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/log/m-p/509205#M136857</guid>
      <dc:creator>singhsahab</dc:creator>
      <dc:date>2018-10-31T16:47:37Z</dc:date>
    </item>
  </channel>
</rss>

