From: Kathy on
Hi guys,

I have a question,

The value of variable "dose"(character variable) are
"0000000.600","000000007.500" and "0000000.050", I would like to show
"0.6","7.5" and "0.05". I tried to use functions (reverse, int), but
all do not work. Could you give me some comments. Thanks a lot!!!

Kathy
From: Ya on
On Jun 15, 8:30 am, Kathy <kunliangrutg...(a)gmail.com> wrote:
> Hi guys,
>
> I have a question,
>
> The value of variable "dose"(character variable)  are
> "0000000.600","000000007.500" and "0000000.050", I would like to show
> "0.6","7.5" and "0.05".  I tried to use functions (reverse, int), but
> all do not work. Could you give me some comments. Thanks a  lot!!!
>
> Kathy

You can use input and put to convert it to needed format:

7 data _null_;
8 do dose="0000000.600","000000007.500","0000000.050";
9 dose=put(input(dose,best32.),best6.);
10 put dose=;
11 end;
12 run;

dose=0.6
dose=7.5
dose=0.05

HTH

Ya