SAS likes to continue processing well after warnings and errors, so I often need to scroll back through pages in the log to find an issue. Is there a better way? I\'d like
I've been using the %runquit macro recently. Works well for both batch jobs and interactive sessions (doesn't close your session, just stops running the code).
Source: http://www.cpc.unc.edu/research/tools/data_analysis/sas_to_stata/sas-macros/runquit.html
To use it you basically type %runquit; at the end of any data step or PROC instead of typing your regular run or quit statement.
Code:
%macro runquit;
; run; quit;
%if &syserr. ne 0 %then %do;
%abort cancel;
%end;
%mend runquit;
Datastep usage:
data something;
* do some stuff;
%runquit;
PROC usage:
proc sql;
* do some stuff;
%runquit;
It's not quite as pretty when reading through code, but it does make debugging a lot easier.