BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

i have a variable which holds big value (100000000000)...so when am using this value for further analysis , sas is coverting this value to exponential format(ex:7.50E+07)......i want to reamin the above big value same in the output.

i applied format variable_name best 32...........but nothing has changed

so kindly suggest any solution for this in order to remain the same value i.e big value


Kumar
5 REPLIES 5
deleted_user
Not applicable
Hi,

Try with the no of maximum digits in the number.
Ex:
data x;
a=1000000000000000;
format a 16.;
run;

proc print;
run;
Peter_C
Rhodochrosite | Level 12
derive another value[pre] big_string = put( big_value, 32. -L ) ; [/pre]
That -L left-aligns the string.
Does this help?

PeterC
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
And what would the purpose hold for big_string as a CHARACTER type variable?

The key here is for the OP to understand the external (formatted) versus the SAS internal NUMERIC variable value, especially when used in a calculation or derivation of some type.

Using a FORMAT statement with a numeric variable is the key here.

There are several technical papers and SAS-hosted Language Reference: Concepts documentation available on this topic at the SAS support http://support.sas.com/ website - consider the Google advanced search argument (or use the SAS website SEARCH facility):

numeric variable precision format site:sas.com


Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
HI actually when am exporting this value to graph output , the sas graph is converting actual value to exponential value.

I mean this value (100000000) should be placedon x -axis in the sas graph..... but sas is converting this value to exponential (ex:1.00E+08)value this means if the value is more than 8 digits then sas graph is converting thay value to exponential....i just want the value on x-axis ahould be actual number but not exponential value.


so do we have any options in sas graph?


kumar
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Yes, the FORMAT statement is one approach. You will need to share your SAS code (complete) for a more detailed reply.

Scott Barry
SBBWorks, Inc.

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
  • 5 replies
  • 684 views
  • 0 likes
  • 3 in conversation