BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
smm662002
Quartz | Level 8

Hello,

 

In VIYA 3.5 we have noticed that for some jobs the status is "Successful" even if the log contains errors. 

For example if the job tried to triggered a SAS code using %include and the file was not available the log message was: 

            warning: WARNING: Physical file does not exist, .
            error: ERROR: Cannot open %INCLUDE file TEST99.

but the job status was "Successful". 

 

I'm wondering if there is a logical explanation for this, or it is a bug?

 

Thank you,

smm662002

 

1 ACCEPTED SOLUTION

Accepted Solutions
smm662002
Quartz | Level 8

Hi,

 

The solution identified for this issue is to use options errorcheck=strict; which is linked to the value of SYSCC.

 

Thank you for your suggestion.

 

Regards,

smm662002

View solution in original post

4 REPLIES 4
gwootton
SAS Super FREQ
I believe this keys off of the exit code of the SAS session. Typically when SAS encounters a warning the exit code is changed to 1, and if SAS encounters an error, the exit code changes to 2. If something else is causing the SAS session's exit code to remain or change back to zero, the job would report as successful.
This could be done in SAS code (ABORT or SYSCC), or with a wrapper script, which is sometime done to prevent warnings from showing as failures (i.e. if $?=1 then rc=0; exit $rc).
--
Greg Wootton | Principal Systems Technical Support Engineer
smm662002
Quartz | Level 8

Hello,

 

Thank you for your answer.

While I understand your explanation I think that this suppose to be part of the tool rather than adding small code twinks to "force" VIYA to understand that there are errors in the code. 

If the code has an error than the status should be "Failed" rather than "Successful".

 

Regards,

smm662002

gwootton
SAS Super FREQ
Sorry for the confusion, the tweaks would break it's ability to understand there was a failure rather than allow it. By default a warning or error change SAS' exit code from 0 (success) to 1 or 2 respectively (failure). However if the default configuration has been modified by a wrapper script for example to change the exit code from 1 or 2 back to zero, or your code explicitly changes the exit code, this could prevent that from working as expected.
--
Greg Wootton | Principal Systems Technical Support Engineer
smm662002
Quartz | Level 8

Hi,

 

The solution identified for this issue is to use options errorcheck=strict; which is linked to the value of SYSCC.

 

Thank you for your suggestion.

 

Regards,

smm662002

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!

Discussion stats
  • 4 replies
  • 844 views
  • 1 like
  • 2 in conversation