<?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: How to check if a dataset is updated for a particular date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269274#M53340</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;The data is extracted from a teradata table, there a jobs scheduled.&lt;/P&gt;&lt;P&gt;the RDBMS jobs keep executing, periodically and the tables are updated as and when the data is avaialble.&lt;/P&gt;&lt;P&gt;the dataset which we are using to generate the report is most of the times updated by 14.00, and if the reports dosent contains the data for the date we are looking for, we check it in a couple of hours manually the data will be availabe by that time. and we re-generate the report once the data is loaded.&lt;/P&gt;&lt;P&gt;kindly suggest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 May 2016 20:31:15 GMT</pubDate>
    <dc:creator>santosh_pat69</dc:creator>
    <dc:date>2016-05-09T20:31:15Z</dc:date>
    <item>
      <title>How to check if a dataset is updated for a particular date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269200#M53319</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to check if the table is updated for a particular date.&lt;/P&gt;
&lt;P&gt;Once the data is available for the mentioned date an email need to triggered to a list of users, else need to check after a couple of hours.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help!!!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 16:49:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269200#M53319</guid>
      <dc:creator>santosh_pat69</dc:creator>
      <dc:date>2016-05-09T16:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: ned to check if the dataset is updated for a particular date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269217#M53326</link>
      <description>&lt;P&gt;How would you know if it's updated? Is there a field to check? Do you need to check the created date?&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 16:48:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269217#M53326</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-09T16:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: ned to check if the dataset is updated for a particular date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269269#M53337</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we have&amp;nbsp; field called CNTRL_DTE i have tried using this&lt;/P&gt;&lt;P&gt;%let Tdy= 01012016; /*Some dummy date used here*/&lt;/P&gt;&lt;P&gt;If cntrl_Dte= "&amp;amp;tdy." and obs = 0 then do;&lt;/P&gt;&lt;P&gt;put Note:"Check the table for updates after sometime";&lt;/P&gt;&lt;P&gt;End;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Else Do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;File email EM;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;End;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for some reason this is not working sometimes this sends the email for the updates and some times hte log says&lt;/P&gt;&lt;P&gt;this condition&lt;/P&gt;&lt;P&gt;If cntrl_Dte= &amp;amp;tdy. and obs = 0 is false;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 20:09:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269269#M53337</guid>
      <dc:creator>santosh_pat69</dc:creator>
      <dc:date>2016-05-09T20:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if a dataset is updated for a particular date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269273#M53339</link>
      <description>How is the table updated in the first place? Perhaps it's easier to automate the mail sending in that step/process?</description>
      <pubDate>Mon, 09 May 2016 20:24:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269273#M53339</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-05-09T20:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if a dataset is updated for a particular date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269274#M53340</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;The data is extracted from a teradata table, there a jobs scheduled.&lt;/P&gt;&lt;P&gt;the RDBMS jobs keep executing, periodically and the tables are updated as and when the data is avaialble.&lt;/P&gt;&lt;P&gt;the dataset which we are using to generate the report is most of the times updated by 14.00, and if the reports dosent contains the data for the date we are looking for, we check it in a couple of hours manually the data will be availabe by that time. and we re-generate the report once the data is loaded.&lt;/P&gt;&lt;P&gt;kindly suggest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 20:31:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269274#M53340</guid>
      <dc:creator>santosh_pat69</dc:creator>
      <dc:date>2016-05-09T20:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if a dataset is updated for a particular date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269312#M53350</link>
      <description>&lt;P&gt;Try create an Integrity Constraint and a AUDIT type dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

data class;
 set sashelp.class;
run;

proc datasets library=work nolist nodetails;
modify class;
ic create age=check(where=(age between 10 and 80))
 message='age must be between 10 and 80';
audit class;
initiate;
quit;


proc sql;
 update class
 set age=20
 where sex='F';
quit;

proc print data=class(type='audit');run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The following will give you two obs for each and every obs which is updated. One is original obs, Another is the updated obs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3099i04FC6745031CE1CC/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="x.png" title="x.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 02:37:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269312#M53350</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-05-10T02:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if a dataset is updated for a particular date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269316#M53352</link>
      <description>&lt;P&gt;Or you don't need create Integrity Constraint, just an Audit Dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data class;
 set sashelp.class;
run;

proc datasets library=work nolist nodetails;
audit class;
initiate;
quit;


proc sql;
 update class
 set age=200
 where sex='F';
quit;

proc print data=class(type='audit');run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 May 2016 02:45:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-if-a-dataset-is-updated-for-a-particular-date/m-p/269316#M53352</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-05-10T02:45:34Z</dc:date>
    </item>
  </channel>
</rss>

