- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a deployed SAS job runs in flow which always fails during the first run and after we re -run manually it will get succeeded. The issue is due to sql server stored procedure which we call in it in the SAS job.
So we thought of adding exception handling in the schedule manager for that job. We have defined that 'if the job fails with exit code greater than zero, we asked it to re-run automatically', But its not working. Is there any other way to remove the manual process of re run ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Could you modify your code to retry a failed call to the stored procedure?
Greg Wootton | Principal Systems Technical Support Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I suggest you talk with your SQL Server database administrator to see if you can get the stored procedure fixed. It's always better to cure the disease rather than treat the symptoms.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
What sort of problem does SAS report with the stored procedure?
If the procedure is taking too long to respond to data request from SAS perhaps you just need to add a bit of code to have SAS wait for the procedure.
Or maybe your connection options between SAS and SQL Server need to be tweeked a bit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Does the job exit with an error or a warning?
If it's an error i'll agree with the other suggestions to fix the error by its source.
If it' a warning, and you want to allow your batch-flows to complete with a warning, then you can edit the sasbatch.bat file.
\SAS\Config\Lev1\SASApp\BatchServer\sasbatch.bat
Just remove the REM in the last four lines as stated in the comments in the file.
This is on a windows platform but I assume that you can do something similar if it's another platform.