Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Remove zeros from right side

Former Member
0 Likes
936

Hi all,

I want to remove zeros from right side.

like : if value is '0.055500000000E+04'.

then the output should be '0.0555'.

How can i get such output.

Plz help me....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
593

Hi,

I am not experienced in your requirement; if you just want to remove zero, then adding the floating point to the char field, then use SHIFT key word.

If you want the correct result then move the floating point to the packed decimals field….

2 REPLIES 2
Read only

Former Member
0 Likes
594

Hi,

I am not experienced in your requirement; if you just want to remove zero, then adding the floating point to the char field, then use SHIFT key word.

If you want the correct result then move the floating point to the packed decimals field….

Read only

Former Member
0 Likes
593

Hi,

the problem here is u are dealing with a datatype of format F (i.e floating point ) and the output u desire is in packed format .

You cannot delete the zeros of such data typesas type F instead u can move them to the packed datatype and get the result.

do one thing declare a variable of type p and move the value of type f which u have right now to the variable u have declared as type p.

data : v_val type p decimals 4.

v_val = " <------ assign the type f to type p over here .

hope this helps .

regards,

vijay.