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
SAS Super FREQ
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-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
  • 626 views
  • 0 likes
  • 2 in conversation