BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
gsweet
Calcite | Level 5

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.

1 ACCEPTED SOLUTION

Accepted Solutions
3 REPLIES 3
Astounding
PROC Star

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

gsweet
Calcite | Level 5

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.

ChrisNZ
Tourmaline | Level 20

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 3 replies
  • 606 views
  • 0 likes
  • 3 in conversation