Hi I have a SAS job that runs successfully 90% of the time. But one of the steps relies on reading an oracle table that is occasionally being updated at the same time as I'm trying to read it. I implemented a check to see if it exists first before querying it, but since the pull takes ~15 minutes, it will sometimes exist at the start of the pull but not by the end which results in a SAS error.

What I want to do is gracefully catch this error, sleep for x time, and then attempt to re-run the same pull without the SAS job failing. Is there a way to do this in SAS? All the things I've searched rely on checking pre-conditions before the pull, but what can I do when those can change during the pull leading to an error?

Thanks.