BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
dgoel
Fluorite | Level 6

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?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

@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.

View solution in original post

4 REPLIES 4
Tom
Super User Tom
Super User

It probably depends on how you are submitting the Teradata code that causes the issue.

dgoel
Fluorite | Level 6
I am calling the procedure there by connecting to teradata.
Tom
Super User Tom
Super User

@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.

dgoel
Fluorite | Level 6

Thank You so much. This worked. I was able to make the execution stop using these macro variables.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 4 replies
  • 3473 views
  • 0 likes
  • 2 in conversation