05-25-2016 04:51 PM
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.
05-25-2016 07:04 PM
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.
05-26-2016 04:02 AM
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: