<?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: SAS Audit Trail in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Audit-Trail/m-p/498706#M132600</link>
    <description>&lt;P&gt;You will need a method to update the MASTER that does not create a new data set.&amp;nbsp; MODIFY.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have to program how the updates are done using _IORC_ and you may want to use the %sysrc macro too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data master;
   modify master transact;
   by id;
   if _iorc_ eq 0 then do;
      _reason_change_ = 'Updt';
      replace;
      end;
   else if _iorc_ eq 1230013 then do;
      _reason_change_ = 'new';
      output;
      end;
   else do;
      errmsg=IORCMSG();   
      putlog 'NOTE: ' errmsg= _iorc_=;
      end;
   run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 25 Sep 2018 11:54:47 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2018-09-25T11:54:47Z</dc:date>
    <item>
      <title>SAS Audit Trail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Audit-Trail/m-p/498685#M132588</link>
      <description>&lt;P&gt;The 'master' dataset became 'non audit-able' after the updating process.&amp;nbsp; Is there any way to make the 'master' dataset audit-able? Anyone can help? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data master;&lt;BR /&gt;input id $ name $ gender $ weight;&lt;BR /&gt;datalines;&lt;BR /&gt;01 Perry M 165&lt;BR /&gt;02 Miller M 145&lt;BR /&gt;03 Davis F 127&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data transact;&lt;BR /&gt;input id $ name $ gender $ weight;&lt;BR /&gt;datalines;&lt;BR /&gt;02 Miller . 160&lt;BR /&gt;03 Bush . 157&lt;BR /&gt;05 Elliot F 125&lt;BR /&gt;02 . M 170&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data=master; BY id; RUN;&lt;BR /&gt;proc sort data=transact; BY id; RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc datasets lib=work;&lt;BR /&gt;audit master;&lt;/P&gt;&lt;P&gt;initiate;&lt;BR /&gt;user_var _reason_change_ $30;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data master;&lt;BR /&gt;update master transact;&lt;BR /&gt;by id;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data auditchk;&lt;BR /&gt;set Master(type=audit);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 09:44:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Audit-Trail/m-p/498685#M132588</guid>
      <dc:creator>scb</dc:creator>
      <dc:date>2018-09-25T09:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Audit Trail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Audit-Trail/m-p/498706#M132600</link>
      <description>&lt;P&gt;You will need a method to update the MASTER that does not create a new data set.&amp;nbsp; MODIFY.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have to program how the updates are done using _IORC_ and you may want to use the %sysrc macro too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data master;
   modify master transact;
   by id;
   if _iorc_ eq 0 then do;
      _reason_change_ = 'Updt';
      replace;
      end;
   else if _iorc_ eq 1230013 then do;
      _reason_change_ = 'new';
      output;
      end;
   else do;
      errmsg=IORCMSG();   
      putlog 'NOTE: ' errmsg= _iorc_=;
      end;
   run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Sep 2018 11:54:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Audit-Trail/m-p/498706#M132600</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2018-09-25T11:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Audit Trail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Audit-Trail/m-p/499418#M132897</link>
      <description>&lt;P&gt;What does _iorc_ eq 1230013 mean? Any website for reference? Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 09:45:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Audit-Trail/m-p/499418#M132897</guid>
      <dc:creator>scb</dc:creator>
      <dc:date>2018-09-27T09:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Audit Trail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Audit-Trail/m-p/499491#M132926</link>
      <description>&lt;PRE&gt;_iorc_ eq 1230013 &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is an expression.&amp;nbsp; It returns 1 when true and 0 when false.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This website will be helpful for a SAS user.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/index.html" target="_blank"&gt;http://support.sas.com/documentation/index.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 13:02:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Audit-Trail/m-p/499491#M132926</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2018-09-27T13:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Audit Trail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Audit-Trail/m-p/499784#M133028</link>
      <description>&lt;P&gt;Must it be 1230013? I got a different answer when change it to other number, such as 1230033.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 07:00:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Audit-Trail/m-p/499784#M133028</guid>
      <dc:creator>scb</dc:creator>
      <dc:date>2018-09-28T07:00:12Z</dc:date>
    </item>
  </channel>
</rss>

