BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm trying to export into Access percentages. The percentages were created using proc tabulate (pctSum)

The percentages are formatted using 5.2
The Access table is showing all the numbers except the value 100.
How can I fix the problem so SAS exports all the values that are 100 into Access?
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
Hi:
99.99 is 5 total characters, including the decimal point. So the format for 99.99 would be 5.2 -- but 100.00 is 6 total characters, including the decimal point. So a format of 5.2 would be incorrect for the SAS format width to use for 100.00 percent. In the same fashion, the dollar amount: $12,345.67 would need at least a width of 10 and the "official" format specification would be: dollar10.2 -- you need 10 as the width because you have 7 numbers and 3 symbols: . , and $.

The clue that you have a format width that's not "wide" enough is that you should see a note in the SAS Log that says something like:

NOTE: At least one W.D format was too small for the number to be printed. The decimal may be
shifted by the "BEST" format.



The format would need to be even larger if you were using a PICTURE format to put a percent sign in the column. Complicating the whole picture is HOW you are exporting to Access (Microsoft Access???) Are you using PROC EXPORT or the LIBNAME engine???

If you fix the format width and your number does not get carried over into Microsoft Access, then you may want to work with Tech Support on this question.

cynthia
deleted_user
Not applicable
Hi Cynthia:

Changing the format to 6.2 solved the problem!!

Thank you!

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 1170 views
  • 0 likes
  • 2 in conversation