Hi,
I want to stop the execution of SAS Job when the following error is there:
ERROR: Teradata execute: No more spool space.
I am observing that SAS does not even get to know about it and it goes till the end of the Job and shows as completed. Does anyone has an idea to instead stop the job at that error? Maybe any Macro idea?
@dgoel wrote:
I am calling the procedure there by connecting to teradata.
So I assume you did something like:
proc sql ;
....
execute( .... ) by TERADATA ;
You should be able to check the SQLXRC and SQLXMSG macro variables.
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473677.htm
Any return code or message that is generated by the DBMS is available in the macro variables SQLXRC and SQLXMSG after the statement completes.
It probably depends on how you are submitting the Teradata code that causes the issue.
@dgoel wrote:
I am calling the procedure there by connecting to teradata.
So I assume you did something like:
proc sql ;
....
execute( .... ) by TERADATA ;
You should be able to check the SQLXRC and SQLXMSG macro variables.
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473677.htm
Any return code or message that is generated by the DBMS is available in the macro variables SQLXRC and SQLXMSG after the statement completes.
Thank You so much. This worked. I was able to make the execution stop using these macro variables.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.