BookmarkSubscribeRSS Feed
JSWilson64
Fluorite | Level 6

Long story short. Older computer (windows server) ran SAS programs scheduled by Windows Scheduled Tasks. Mostly Proc SQL statements connecting to a Teradata database and retrieving data. 

 

The programs ran (SAS 9.1.x) in such a way that once an error was encountered, NOEXEC would be invoked. If no error, the program ran all the way through.  Immediately following the error in the log would be the note:

 

NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.

 

But ... I can't figure out how this was done. Newer computer (windows 2008 server, SAS 9.4) running some of the same programs does not kick into NOEXEC mode upon an error.  

 

I'm not sure what to look for, or where. I don't see any OPTIONS statements that affect error-handling as far as I can tell. 

 

Here is the main OPTIONS statement in the main program that calls other programs as needed:

OPTIONS MPRINT MLOGIC SYMBOLGEN NODATE NONUMBER NOLABEL sastrace=',,,d' sastraceloc=saslog compress=yes replace workterm ;

 

The one thing I do not have access to is the sasv9.cfg on the old machine - this was lost in the transition and is unrecoverable. So there may be a system option for this. Or not. 

 

it's probably simple and I'm going to kick myself when I hear the answer.

 

Thanks.

2 REPLIES 2
jklaverstijn
Rhodochrosite | Level 12

Hi @JSWilson64,

 

It is standard behaviour for SQL to switch on NOEXEC if an error was encountered. There is an interaction with the ERRORSTOP procedure option but that should normally be visible in your code. The ERRORSTOP option default is different for interactive and batch mode. Any chance that the way you run SAS be different between the old and new setup? That would be the only cause I can think of. Automatic macro variable SYSENV will tell you if this is batch (&sysenv=BACK) or interactive (&sysenv=FORE).

 

Your log including the output of PROC OPTIONS and the value of the SYSENV macro variable would help us clear this up.

 

Regards,

- Jan.

SASKiwi
PROC Star

I think the SAS option you are after is SYNTAXCHECK. This option is set on by default for SAS batch and non-interactive jobs but not for interactive SAS sessions for obvious reasons:

 

http://support.sas.com/documentation/cdl/en/lesysoptsref/68023/HTML/default/viewer.htm#n014qbvh3po8w...

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 5454 views
  • 0 likes
  • 3 in conversation