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

Good morning,

 

I am currently using SAS Enterprise Guide 5.1 on a Windows 7 operating system and I am currently dealing with floating point overflow errors.

 

I am working on a stored process and occassionally encounter floating point overflow errors.  I have been looking for a way to end the stored process, or call another stored process, if a floating point overflow error is thrown and display a message that the program failed to complete.  I am looking to have something other than the Stored Process Error Log being shown because other people will be using this program in the future.

 

The floating point overflow error is appearing during an iteration of PROC NLIN.

 

 

proc nlin data=&dataset nohalve maxiter=20000;
		parms b1=&B1_x b2=&B2_x J=&J_x;
		model var=b1*(b2+mean)**J;
		resid=model.var;
		_weight_=(n-1)/(resid**2);
		ods exclude all;
		ods output ParameterEstimates=FINAL_&dataset;
	run;quit;

 

FPOE.jpg

 

I'm wondering if there is a way to have the program stop and either print a message on the screen, or call another stored process which, in turn, would display a message the program failed to complete.

 

I have tried using the macro variable &SYSERR, but that doesn't work because the NLIN fails to complete so the &SYSERR can't be checked to see if there were errors.

 

Are there any other methods of error trapping that I could use with NLIN to catch the floating point overflow error and have control on how the error is expressed?

 

Thank you.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

Good advice about checking the data set length.

 

If the NLIN step consistently throws a floating point exception in certain conditions, you might want to work with SAS Tech Support to see if there is anything you can do to trap that condition (or avoid it) when it occurs.  Or check to see if it's a known problem with NLIN (assuming with EG 5.1 you might be using SAS 9.3 and SAS/STAT 12.1?) -- perhaps there is a fix.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

2 REPLIES 2
bharathkumar
Fluorite | Level 6

Hi Chris,

 

I don't know much about "proc nlin" process, But I will give you suggestion It may work.

 

If the proc nlin procedure fails then "Final_&dataset" having "0"  obesrvations, so based on final dataset we can trap TRAP the error.

If the dataset have more than one observation your program is successful else fail... 

 

Let me know if you have any questions or Correct If  I am wrong.

 

Regards,

Bharath

 

 

 

 

 

 

ChrisHemedinger
Community Manager

Good advice about checking the data set length.

 

If the NLIN step consistently throws a floating point exception in certain conditions, you might want to work with SAS Tech Support to see if there is anything you can do to trap that condition (or avoid it) when it occurs.  Or check to see if it's a known problem with NLIN (assuming with EG 5.1 you might be using SAS 9.3 and SAS/STAT 12.1?) -- perhaps there is a fix.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

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
  • 1157 views
  • 2 likes
  • 3 in conversation