DATA Step, Macro, Functions and more

For some warnings SAS retrun code on unix is 1 while others 0.. Is this some bug in SAS

Reply
Occasional Contributor
Posts: 12

For some warnings SAS retrun code on unix is 1 while others 0.. Is this some bug in SAS

For some warnings SAS retrun code on unix is 1 while others 0.. Is there some general rule regarding retrun code for warnings.

I was under the impression that the return code for all warnings should always be 1.

Super User
Posts: 5,079

Re: For some warnings SAS retrun code on unix is 1 while others 0.. Is this some bug in SAS

There's one warning I know of that won't affect the return code.  You get warnings when you haven't paid your license renewal, and are getting close to the expiration date of the software.  To me, it makes sense that this would not change the return code.  If you have written programs/macros/code to look for non-zero return codes, you wouldn't want red flags popping up all over the place just because you are getting close to your license renewal date.

SAS Employee
Posts: 24

Re: For some warnings SAS retrun code on unix is 1 while others 0.. Is this some bug in SAS

This documentation should help you:

http://support.sas.com/documentation/cdl/en/mcrolref/67912/HTML/default/viewer.htm#n1wrevo4roqsnxn1f...

It describes the automatic macro variable SYSERR and what it's values can be. There is also a link on this page to the automatic macro variable SYSCC.

Michelle

Super User
Posts: 3,102

Re: For some warnings SAS retrun code on unix is 1 while others 0.. Is this some bug in SAS

Be aware that you can encounter situations where SAS sets the return code incorrectly. A search through SAS notes may be helpful for these.

PROC Star
Posts: 1,230

Re: For some warnings SAS retrun code on unix is 1 while others 0.. Is this some bug in SAS

[ Edited ]

I tend to rely more on log scanning than return codes. I found this recent WUSS paper from Troy Hughes a useful review of some of the return code idiosyncracies. http://www.lexjansen.com/wuss/2015/80_Final_Paper_PDF.pdf

Ask a Question
Discussion stats
  • 4 replies
  • 186 views
  • 0 likes
  • 5 in conversation