10-19-2014 12:25 AM
I wrote the below program,so that it can check for the files,sleep for a while check again and if the files are not found then, send an email with the missing file names.
the below program works,however it sends separate emails for every missing file.
I wanted to know if it is possible to have one email which states all the missing files.
File 2 & 3 are missing.
Any help would be great..
%macro file_exits (mMyFile, HowOfftenToTest, HowLongBetweenTests, EmailAdress);
%let fc = %sysfunc(fileexist(&mMyFile));
%if &fc = 1 %then
%put "Files received";
%if &fc=0 %then %do;
FILENAME EML EMAIL TO = ("&EmailAdress")
SUBJECT = "Files not found";
PUT "&mMyFile does not exist" ;
%file_exits(/mie/data/test3.txt, 2, 10, Me@internet.com);
%file_exits(/mie/data/test2.txt, 2, 10, Me@internet.com);
%file_exits(/mie/data/test1.txt, 2, 10, Me@internet.com);
10-19-2014 02:40 AM
redesign your program..... You want a list of missings files, than first build that list.
A lot of this kind of functionality may be already there with schedulers. Just use available tools instead of inventing them again.