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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

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