error handled differently in Windows and Linux

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

error handled differently in Windows and Linux

I'm running macro code that sets random start values and compiles the results of a proc command. It's a loop that continues until one of several conditions is met. From time to time, one of these random start values results in a floating point overflow. SAS reacts differently to this error in Windows and Linux. In Windows, I get the following:

 

ERROR: Floating Point Overflow

ERROR: Termination due to Floating Point Exception

NOTE: The SAS System stopped processing this step because of errors.

 

It then exits the macro. But I set up the code so that it repeatedly calls the macro. So in Windows it just goes on to the next command that tells it to restart the macro. The code proceeds with new random start values, and all is well.  In Linux, however, this is a fatal error:

 

ERROR: Floating Point Overflow

ERROR: Termination due to Floating Point Exception

NOTE: The SAS System stopped processing this step because of errors.

NOTE: SAS set option OBS=0 and will continue to check statements. This might cause NOTE: No observations in data set.

 

This results in a long string of error messages until the program dies. I want SAS in Linux to behave as it does in Windows. I checked the error handling system options in the two environments using proc options group=errorhandling. All of the error handling options settings are identical across the two environments. I tried setting an options statement "options obs=max" right after the part of the program that sometimes results in the floating point overflow to override the obs=0 option. No dice. One other difference is that I'm running the Linux syntax in batch mode. Any ideas on what else I can do so that SAS does not respond with "obs=0" in Linux? 

 

My two environments, if that helps, are:

X64_7PRO WIN 6.1.7601 Service Pack 1, SAS 9.4 (TS1M0)

Linux 3.10.0-693.21.1.e17.x86_64, SAS 9.4 (TS1M0)

 

Thanks.


Accepted Solutions
Solution
‎05-08-2018 01:59 AM
Super User
Posts: 6,763

Re: error handled differently in Windows and Linux

Worth a try (no guarantees) and use at your own risk (see documentation):

 

options nosyntaxcheck;

 

http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#base-sysop-syntaxch...

View solution in original post


All Replies
Solution
‎05-08-2018 01:59 AM
Super User
Posts: 6,763

Re: error handled differently in Windows and Linux

Worth a try (no guarantees) and use at your own risk (see documentation):

 

options nosyntaxcheck;

 

http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#base-sysop-syntaxch...

New Contributor
Posts: 2

Re: error handled differently in Windows and Linux

Posted in reply to Astounding

Thank you! This worked. The different error handling was due to the Linux environment being run in batch mode. Both environments had the same error handling options, but NODMSSYNCHK only applied in the windowing environment, and SYNTAXCHECK only applied in batch mode. Changing the option to NOSYNTAXCHECK made them both run the same. You have to trust your code to do this in batch mode though.

PROC Star
Posts: 2,350

Re: error handled differently in Windows and Linux

Or try resetting options OBS=max; after each macro call. 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 120 views
  • 0 likes
  • 3 in conversation