Help using Base SAS procedures

Format

Reply
N/A
Posts: 0

Format

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
N/A
Posts: 0

Re: Format

Posted in reply to deleted_user
Hi,

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

proc print;
run;
Valued Guide
Posts: 2,177

Re: Format

Posted in reply to deleted_user
derive another value[pre] big_string = put( big_value, 32. -L ) ; [/pre]
That -L left-aligns the string.
Does this help?

PeterC
Super Contributor
Super Contributor
Posts: 3,174

Re: Format

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.
N/A
Posts: 0

Re: Format

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
Super Contributor
Super Contributor
Posts: 3,174

Re: Format

Posted in reply to deleted_user
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.
Ask a Question
Discussion stats
  • 5 replies
  • 154 views
  • 0 likes
  • 3 in conversation