Hi
Evry day I send some files into a folder
these files are created in this macro - when the files are sent I get an email that says files has been send - if it fails I get an email that says error.
I want to create a text file with some text that has to be sent to the folder with the files IF the files has no errors. How can I add that in the do and else function?
%macro leverance(region);
/*tabel 1*/
here I will have code for the datasets
/*tabel 2*/
here I will have code for the datasets
/*tabel 3*/
here I will have code for the datasets
/*tabel 4*/
here I will have code for the datasets
/*tabel 5*/
here I will have code for the datasets
/*tabel 1*/
here I will have code for the datasets
%do i=1 %to 5;
proc export data=tabel&i. replace
outfile="&out_folder.\&data._TAB&i._&YYYYMMDD..csv"
dbms=dlm
;
delimiter=';';
quit;
%end;
%mend;
%macro dummy_macro();
%if &nobs ne 4 %then %do;
filename mymail email from='test@test.org' to=&mailto.
subject='ERROR - the data has not been send'
%end;
%else %do;
%leverance(A);
%leverance(B);
%leverance(C);
%leverance(D);
%leverance(E);
filename mymail email from='test@test.test' to=&mailto.
subject='The files has been succesfully send';
%end;
%mend;
%dummy_macro();