Hi,
I have a master program which sets up a bunch of parameters and libraries, then uses a number of %include steps to run a series of other SAS programs. Each of these SAS programs is a separate test and after running appends output to a table, but they are all essentially independent of each other.
the problem is, if one of those programs has an error, SAS goes into debug mode (sets OBS to 0 just does SYNTAXCHECK from then on) and so will not run any of the subsequent programs.
What I want to know is, is there a way to reset the error condition after each %include, so that if one program fails, the next one can still run.
I saw that there's an "options NOSYNTAXCHECK;" method, but that would cause the failed program to continue running as well, which isn't what I want.
Failing this, I'd need to move each individual program into the batch script instead, and do a bunch of additional logic etc in each SAS program, which I'd rather not do if I can avoid it.
options compress='Y';
%include "setup.sas";
* Logic to check day of week *;
%include "daily_test1.sas";
* If daily_test1.sas fails, daily_test2.sas will run with obs=0 *;
* I want it to run properly, can I reset the error status here? *;
%include "daily_test2.sas";
Cheers
Chris.
... View more