Hi,
I ran a prof freq and I got my results but i am trying to remove the Exponent (E) from my result.
Example;
proc freq data = income;
table amount;
run;
Result ;
amount frequency Percent Cum_freq Cum_persent
0 42344E12 60.20 3454E54 100.00
1 44535E33 34.44 5675E44 60.00
I am not sure if we could resolve it, alternatively we use the proc sql.
Send the result to a data set an specify a longer format in Proc Print to display the values.
proc freq data = income noprint; table amount/ outcum out=work.count; run; proc print data=work.count; format count cum_freq best32.; run;
HOWEVER, none of the SAS numeric formats want to display 54+digit with 32 the limit. So you are still going to have some scientific notation. And 2 to the 53rd power (15 significant digits) is the largest integer that SAS has for precision of storage so you are exceeding that anyway.
proc tabulate data=income;
class amount;
table amount*n=''*f=32.;
run;
Maybe this will work?
@CathyVI wrote:
Hi,
I ran a prof freq and I got my results but i am trying to remove the Exponent (E) from my result.
Example;
proc freq data = income;
table amount;
run;
Result ;
amount frequency Percent Cum_freq Cum_persent
0 42344E12 60.20 3454E54 100.00
1 44535E33 34.44 5675E44 60.00
So I tried this for a 2 x 2 table but didn't work
For example;
proc tabulate data=med;
class name;
table blank*name*n=''*f=32.;
run;
???
I am using proc freq to find 2x2 and 2x3 table so how will I use the proc tabulate without getting an exponent in my result ?
Note that your totals are too large for SAS to represent exactly. Maximum number of decimal digits is 15 .
The value 42344E12 would take more than 15 digits.
So why not just accept the scientific notation?
Or roll your own CUM variables.
proc freq data=sashelp.class ;
tables sex / noprint out=counts;
run;
data counts;
set counts;
cum_count+count;
cum_percent+percent;
format count cum_count 32. percent cum_percent 6.2 ;
run;
proc print width=min;
run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.