BookmarkSubscribeRSS Feed
jzhang332002
Fluorite | Level 6

I have a dataset where some rows contain bad numerical fields which cause segmentation error when I do math operation on the variable. Does any one know how to identify them and filter them out so I can work on sound data? Thanks.

Jian

2 REPLIES 2
Reeza
Super User

More details Smiley Happy

What is "bad numerical field"?

What is "math operation"?

What is "segmentation error"?

Is this in IML? A data step, or specific proc?

ballardw
Super User

What kind of bad data? Examples of the code generating the errors would be helpful.

The general approach involves IF or Select statements

If the problem is divide by zero something like:

If X=0 then result=.;

Else result= var1 / x;

If values are too small or too large then similar syntax with a range check.

But could the issue be related to accessing an external database? Mostly I get errors about invalid opertions not segmentation errors.

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