DATA Step, Macro, Functions and more

Need a varible value as 12.10 and it must be in numeric version?

Reply
Highlighted
Contributor
Posts: 52

Need a varible value as 12.10 and it must be in numeric version?

I need "a" value as "12.10" in numeric version not in character.

 

Required Output: a=12.10---------numeric variable

 

data a;
a=12.10;
/*b=put(a,best.);*/
/*c=put(a,5.2);*/
run;

Trusted Advisor
Posts: 1,932

Re: Need a varible value as 12.10 and it must be in numeric version?

Posted in reply to rajeshalwayswel

If you need a specific format in your output, you use the proper format. You can't force a numeric variable in SAS to have the appearance you want any other way.

 

 

data a;
    a=12.10;
    format a 5.2;
run;
Ask a Question
Discussion stats
  • 1 reply
  • 75 views
  • 1 like
  • 2 in conversation