Reputation: 11
I am looking for a solution which will monitor (using do loop) dictionary.tables for the latest modified date (modate) of a particular table and once the modified date (modate) equals today's date i want to be notified via the email facility in SAS.
Can this be done???
Many thanks
Upvotes: 0
Views: 89
Reputation: 9569
It sounds as though you need to define a simple little macro incorporating your existing code:
/* Define a macro that sleeps in a loop until your condition is met */
%macro wait_then_email;
%local EMAIL_CONDITION SLEEP;
%let EMAIL_CONDITION = 0;
%do %while(&EMAIL_CONDITION = 0);
/* Insert logic here that sets &EMAIL_CONDITION to 1 based on moddate */
/* Wait for 1 minute if condition not met*/
%if &EMAIL_CONDITION = 0 %then %let SLEEP = %sysfunc(sleep(60,1));
%end;
/*Insert email generation code here*/
%mend;
/* Run the macro! */
%wait_then_email;
Upvotes: 1