Hi friends, I need some help to complete one task. There is a group of datasets in which I need to search for particular datasets ,if the dataset is found then the name gets displayed and in case if the dataset is not found it has to search in a time period of three hours for every 15 minutes.It means for every 15th min the loop should start searching for the datatset continuously till three hours. And if the dataset is not found the loop must terminate and the execution should stop showing the error message in the error log. I have a ssample code where the loop is getting executed but not showing the error message in error log.Please suggest some changes. sample : %macro checkds(dsn,time_to_check_in_sec=60,check_interval_in_sec=30); %local startdttm; %let startdttm=%sysfunc(datetime()); %do %while( %sysfunc(sum(%sysfunc(datetime()),-&startdttm))<&time_to_check_in_sec ); %if %sysfunc(exist(&dsn)) %then %do; proc print data = &dsn; run; %goto done; %end; %put &=startdttm; data _null_; call sleep(&check_interval_in_sec,1); stop; run; %end; %abort; data _null_; file print; put #3 @10 "Data set &dsn. does not exist"; run; %done: ; %mend checkds; %checkds(sashelp.class); %checkds(sashelp.class_not_exist);
... View more