DATA Step, Macro, Functions and more

Correctly importing numeric values that have the occassional characters

Reply
N/A
Posts: 0

Correctly importing numeric values that have the occassional characters

Hi, I'm importing a dataset that has 105,000 rows of data. The one column, we'll call 'X', has about 90,000 observations of numeric values and 15,000 rows of character values. If i tell it to import it as a number I get a ton of errors. The dataset I get is fine because it's them in as a missing values, I can drop them and go on with my analysis. Is there a way I can get rid of these error messages and still keep X as a numeric?
Super Contributor
Super Contributor
Posts: 3,174

Re: Correctly importing numeric values that have the occassional characters

If you are not able to code the INPUT statement yourself (where you can introduce ?? ahead of the specified INFORMAT), consider investigating the use of the ERRORS= system option for handling this condition.

Scott Barry
SBBWorks, Inc.

SAS Language Reference: Concepts, Error Processing in SAS
http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000993436.htm
Ask a Question
Discussion stats
  • 1 reply
  • 119 views
  • 0 likes
  • 2 in conversation