BookmarkSubscribeRSS Feed
jad12
Calcite | Level 5
Hi,

I need to import a text file and avoid the scientific notation for long numbers, is there an option I could use in proc import?

Thank you in advance,
2 REPLIES 2
SPR
Quartz | Level 8 SPR
Quartz | Level 8
Hello Jad12,

Why do you need to avoid scientific notation? It is only a representation of numbers and you could change it using appropriate formatting.

Sincerely,
SPR
ballardw
Super User
One cause of the scientific notation is that the values have been imported with a BESTX. format and the width is smaller than you would like. So SAS is only displaying the X number of columns. By default SAS uses 20 rows to guess the format for numerics (from online help for PROC IMPORT). Set the option GUESSINGROWS= to something larger so that SAS "sees" more rows and gets a better chance to assign a width you'd like.

Or look at the datastep code generated in the log when using PROC IMPORT and customize it to assign the formats you'd like. Copy it from the LOG, past into the editor and got to town. I would recommend this if you you are going to import many files in the same format.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 6655 views
  • 0 likes
  • 3 in conversation