diff --git a/all.sas b/all.sas index aebb823..3db78cb 100644 --- a/all.sas +++ b/all.sas @@ -1715,14 +1715,20 @@ Usage: %then %do; options obs=max replace nosyntaxcheck mprint; %if &mode=INCLUDE %then %do; - data _null_; - set &errds; - call symputx('iftrue',iftrue,'l'); - call symputx('mac',mac,'l'); - call symputx('msg',msg,'l'); - putlog (_all_)(=); - run; - %if (&iftrue)=0 %then %return; + %if %sysfunc(exist(&errds))=1 %then %do; + data _null_; + set &errds; + call symputx('iftrue',iftrue,'l'); + call symputx('mac',mac,'l'); + call symputx('msg',msg,'l'); + putlog (_all_)(=); + run; + %if (&iftrue)=0 %then %return; + %end; + %else %do; + %put &sysmacroname: No include errors found; + %return; + %end; %end; /* extract log errs / warns, if exist */ diff --git a/base/mp_abort.sas b/base/mp_abort.sas index e4d9ae0..55ae2ca 100644 --- a/base/mp_abort.sas +++ b/base/mp_abort.sas @@ -88,14 +88,20 @@ %then %do; options obs=max replace nosyntaxcheck mprint; %if &mode=INCLUDE %then %do; - data _null_; - set &errds; - call symputx('iftrue',iftrue,'l'); - call symputx('mac',mac,'l'); - call symputx('msg',msg,'l'); - putlog (_all_)(=); - run; - %if (&iftrue)=0 %then %return; + %if %sysfunc(exist(&errds))=1 %then %do; + data _null_; + set &errds; + call symputx('iftrue',iftrue,'l'); + call symputx('mac',mac,'l'); + call symputx('msg',msg,'l'); + putlog (_all_)(=); + run; + %if (&iftrue)=0 %then %return; + %end; + %else %do; + %put &sysmacroname: No include errors found; + %return; + %end; %end; /* extract log errs / warns, if exist */