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

Hello SASers,

 

I am using proc import to import a .csv file created by excel. The file has a set of numeric variables. The values of all the variables are either 0 or 1.08695652173913. 

 

But, SAS is changing the value of 1.08695652173913 to the value of  1.086956522.  

 

Why does this happen, and what can I do to get SAS to import the exact values from the .csv file?

 

This is a big issue because I am summing over a large number of numeric variables, and it is resulting in a 1 point difference for each observation. 

 

Thanks

1 ACCEPTED SOLUTION
2 REPLIES 2
SASKiwi
PROC Star

How do you know SAS is actually truncating/rounding? It could just be displaying a certain number of digits by default but internally storing with full precision. Try formatting the variable as say BEST16. to confirm.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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