Use the ok
option in submit
statement (ref). Later in the code, you can handle the error based on the value of the variable that stores the information from ok
.
submit / R ok = isOK;
* Do stuff;
endsubmit;
if isOK then do;
* Handle the no error case;
end;
else
* handle the error case;
It does not appear that you can capture the error message itself, unless you write the R script to return some error code instead of failing.