1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-15 12:30:06 +00:00

fix: conditional logic around mp_abort(mode=INCLUDE) to cover case when no mp_include was executed

This commit is contained in:
Allan Bowe
2021-09-05 20:55:44 +03:00
parent 5cc5fae750
commit d096cbddeb
2 changed files with 28 additions and 16 deletions

View File

@@ -1715,6 +1715,7 @@ Usage:
%then %do; %then %do;
options obs=max replace nosyntaxcheck mprint; options obs=max replace nosyntaxcheck mprint;
%if &mode=INCLUDE %then %do; %if &mode=INCLUDE %then %do;
%if %sysfunc(exist(&errds))=1 %then %do;
data _null_; data _null_;
set &errds; set &errds;
call symputx('iftrue',iftrue,'l'); call symputx('iftrue',iftrue,'l');
@@ -1724,6 +1725,11 @@ Usage:
run; run;
%if (&iftrue)=0 %then %return; %if (&iftrue)=0 %then %return;
%end; %end;
%else %do;
%put &sysmacroname: No include errors found;
%return;
%end;
%end;
/* extract log errs / warns, if exist */ /* extract log errs / warns, if exist */
%local logloc logline; %local logloc logline;

View File

@@ -88,6 +88,7 @@
%then %do; %then %do;
options obs=max replace nosyntaxcheck mprint; options obs=max replace nosyntaxcheck mprint;
%if &mode=INCLUDE %then %do; %if &mode=INCLUDE %then %do;
%if %sysfunc(exist(&errds))=1 %then %do;
data _null_; data _null_;
set &errds; set &errds;
call symputx('iftrue',iftrue,'l'); call symputx('iftrue',iftrue,'l');
@@ -97,6 +98,11 @@
run; run;
%if (&iftrue)=0 %then %return; %if (&iftrue)=0 %then %return;
%end; %end;
%else %do;
%put &sysmacroname: No include errors found;
%return;
%end;
%end;
/* extract log errs / warns, if exist */ /* extract log errs / warns, if exist */
%local logloc logline; %local logloc logline;