02-11-2014 05:22 AM
I would like to delay the code I am running using the date modified/created of a key dataset. So, only run once xx dataset is updated for the day.
I have been trying to find if this is possible but cannot see anything obvious.
Does anyone have any tips/suggestions/solutions?
02-11-2014 06:44 AM
Could you please exemplify? Are there rules on what jobs should run how often etc? What do you mean by delay?
Depending on the complexity of your system, it sounds like you could benefit from using scheduling software.
02-11-2014 06:53 AM
Thanks for your reply.
Specifically. I run a piece of code on a dataset. This occurs daily but the source dataset is updated at a variable point in the day. It can be 9am or as late as 1pm.
The source data is updated as part of a batch process. My code cannot be included in the batch process so I am looking to delay the running of it until the source data has had the daily updated.
Does this help to clarify the requirement?
02-11-2014 09:05 AM
If you are not going all in for a scheduler, you could create a code snippet that checks the SAS table for update time (there is a SAS file function available for this), then checks a log table for completed executions. Then terminate the session if not the execution criteria is fulfilled (or do %include or similar call if executions criteria is fulfilled).
Then o course you need to add to the log after a successful execution is done.
02-17-2014 11:25 AM
Thanks for your reply. That broadly makes sense to me - do you have any pointers as I am still a relative novice sas coder.
thanks very much