Date: Thu, 20 Sep 2007 17:11:07 -0400
Reply-To: "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Organization: Internet News Service
Subject: When does ERRORABEND really do ?
Some macro code is run in either foreground (DMS) or background (BATCH).
If an error 'state' occurs, I want the FORE session to simply show an error
and continue
By what criteria does ERRORABEND truly end the session ?
I run a sas program in batch using a custom command line having
sas.exe -errorabend -noterminal -sysin
I thought maybe an ERROR: message in the log might do it -- nope. If it
did, I was hoping the session would end before the second %put ERROR.
-------------------
options nosource
%macro x;
%put NOTE: HI;
%put WARNING: There;
%put ERROR: Bye;
%put ERROR: Bye;
%let SYSERR = 1;
%mend;
%x
%x;
data _null_;
run;
data class;
set sashelp.class;
run;
-------------------
Some types of real ERRORS dont either! This code goes into error check mode
instead of abending.
-------------------
options nosource
%macro x;
%put ERROR: Bye;
%let SYSERR = 1;
%mend;
%x
%x;
data _null_;
run;
data class;
set sashelp.class;
run;
-------------------
Finally, an ERROR in a data step does cause abend. The final data step
never runs because sas abends due to the error of the previous data step.
-------------------
options nosource
%macro x;
%put ERROR: Bye;
%let SYSERR = 1;
%mend;
%x
%x;
data class;
set sashelp.class;
run;
data _null_;
set xyz;
run;
data class;
set sashelp.class;
run;
-------------------
Richard A. DeVenezia