<?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: Generate log error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Generate-log-error/m-p/527970#M144033</link>
    <description>&lt;P&gt;How big is your data set?&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jan 2019 10:14:04 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-01-17T10:14:04Z</dc:date>
    <item>
      <title>Generate log error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-log-error/m-p/527967#M144032</link>
      <description>&lt;P&gt;How to generate error in log for duplicte records&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 09:58:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-log-error/m-p/527967#M144032</guid>
      <dc:creator>Aayushi_17</dc:creator>
      <dc:date>2019-01-17T09:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Generate log error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-log-error/m-p/527970#M144033</link>
      <description>&lt;P&gt;How big is your data set?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 10:14:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-log-error/m-p/527970#M144033</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-01-17T10:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Generate log error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-log-error/m-p/527975#M144034</link>
      <description>&lt;P&gt;There are several ways to approach a problem like this. Here is one using the hash object&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data testdata(drop=i j);
   array vars var1-var3;
   do i=1 to 100;
      do j=1 to dim(vars);
         vars[j]=rand('integer', 1, 10);
      end;
      output;
   end;
run;

data test2;
   if _N_ = 1 then do;
      declare hash h();
      h.defineKey('var1', 'var2', 'var3');
      h.defineDone();
   end;
 
   set testdata;
 
   rc=h.check();

   if rc=0 then do;
      put 'ERROR: Duplicate Row Detected in Observation No: ' _N_;
      stop;
   end;
   if h.check() ne 0 then do;
      output;
      h.add();
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Jan 2019 10:21:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-log-error/m-p/527975#M144034</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-01-17T10:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Generate log error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-log-error/m-p/527979#M144035</link>
      <description>Thank you so much</description>
      <pubDate>Thu, 17 Jan 2019 10:29:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-log-error/m-p/527979#M144035</guid>
      <dc:creator>Aayushi_17</dc:creator>
      <dc:date>2019-01-17T10:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Generate log error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-log-error/m-p/528014#M144049</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data testdata(drop=i j);
   array vars var1-var3;
   do i=1 to 100;
      do j=1 to dim(vars);
         vars[j]=rand('integer', 1, 10);
      end;
      output;
   end;
run;

data _null_;
if 0 then set testdata;
      declare hash h(dataset:'testdata',duplicate:'e');
      h.defineKey('var1', 'var2', 'var3');
      h.defineDone();
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Jan 2019 13:20:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-log-error/m-p/528014#M144049</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-01-17T13:20:42Z</dc:date>
    </item>
  </channel>
</rss>

