Stop SAS EG project if error is encountered -
i tried putting before programs (using option include code in pre-processing):
options errorabend;
it trigger warning popup next files executed. example:
a -> b -> c -> d
if has error, popup saying error occured , server has disconnected, however, b, c, , d run. want project execution stop @ a.
i have several old projects tens if not hundreds of programs , therefore don't consider using macro (is there way make sas stop upon first warning or error?) while checking errors option.
what can done?
thank you!
edit: sas entreprise guide 7.1
i think best way write in macro, like:
%macro error_check; 'your process a'; %if &syserr > 0 %then %do; %goto exit; %end; /* if systemerror value greater zero, go exit directly */ 'your process b'; 'your process c'; 'your process d'; %exit: /* careful, not semicolon*/ %mend;
just try not put %if &syserr loop inside "data-run statement". tried , things got complicated.
Comments
Post a Comment