remove negative and adding ( )
I have variable v_var(12) type p decimals 4.
The default value is 152.26-.
I need to remove the negative and the output should be like this ( 152.26 ).
I tried to concatenate but it is giving error.
Please guide me.
Thank you very much.
Kunjal Patel replied
If you want to remove the negative sign then you can use the ABS keyword as mentioned earlier in the response...
If you want to concatenate then you need to move this value into a field having data type CHAR....
Use the following code:
DATA tmp type string. MOVE v_var to tmp. CONCATENATE '(' tmp ')' INTO tmp SEPERATED BY SPACE.
Hope this helps..