03-14-2018 05:58 PM
I have the following problem with sas batch mode:
During program execution in batch mode if there is any error the rest of the program is not executed.
There is an option or trick to make the rest of the program executed.
Thank you very much for all your help
03-14-2018 06:35 PM
Look at these options
NOERRORABEND Does not end SAS for most errors, issues an error message, sets OBS=0, and goes into syntax check mode.
NOERRORBYABEND Does not end a SAS program when an error occurs in BY-group processing, issues an error, and continues
I question why you would want this behaviour though.
03-14-2018 06:47 PM
I'd say that execution stops once an error has been encountered is a good thing. You'll enter into an undefined situation after an error and if processing would continue then unexpected things could happen (i.e. overwriting a table with wrong data).
If you want some process to execute after program failure (i.e. sending out an email alert) then consider using a scheduler where you then check the return code of the process and in case of failure have the scheduler trigger another program which send out the email (or whatever else you want to do).