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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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