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;
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.
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.
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
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.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
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.
Ready to level-up your skills? Choose your own adventure.