Rick A. answered 04/11/19
Experienced SAS Professional
Adding this statement will get you what you want for ERROR processing. There aren't any similar options for WARNING processing.
OPTIONS ERRORABEND ERRORBYABEND ERRORCHECK=STRICT ERRORS=1;
The system defaults are:
OPTIONS NOERRORABEND NOERRORBYABEND ERRORCHECK=NORMAL ERRORS=20;
You can see what all of your system options are set to with:
PROC OPTIONS; RUN:
Note that by default, when an error occurs, SAS "stops" processing by setting OBS=0 for all remaining steps but continues to syntax check the rest of the program. OPTIONS ERRORABEND instead abends the program immediately.