If you submit R code that causes an error, you can attempt to handle the error by using the OK= option in the SUBMIT statement, as described in Handling Errors in a SUBMIT Block.