Learning SAS? Welcome to the exclusive online community for all SAS learners.

How to show the full length of a numeric variable.

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

How to show the full length of a numeric variable.

[ Edited ]

I want to show the value of a numeric variable to its full length.

Example:

2.90768564E12 should be printed as 2907685640000.


Beginner here, so please try to explain in simple terms.

Thanks in advance.


Accepted Solutions
Solution
‎05-19-2018 03:51 AM
PROC Star
Posts: 1,400

Re: How to show the full length of a numeric variable.

Posted in reply to nahideraha

Simply add an appropriate format like this

 

data test;
    num=2.90768564E12;
    format num best20.;
run;

Doesn't change the actual value, only how the number is displayed.

 

You can find other numeric formats at the SAS Documentation

View solution in original post


All Replies
Solution
‎05-19-2018 03:51 AM
PROC Star
Posts: 1,400

Re: How to show the full length of a numeric variable.

Posted in reply to nahideraha

Simply add an appropriate format like this

 

data test;
    num=2.90768564E12;
    format num best20.;
run;

Doesn't change the actual value, only how the number is displayed.

 

You can find other numeric formats at the SAS Documentation

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 222 views
  • 1 like
  • 2 in conversation