Application Development 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: 

CONVERT CHAR TO CURR

Former Member
0 Kudos

Hello,

I have to convert from a variable char (255) to other thar is curr (15). Is it possible?, how i cast it?, any ideas?.

Thanks for your help!!.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You have to do the following.


shift v_char255 left deleting leading spaces.
translate v_char255 using ', '.
condense v_char255 no-gaps.
v_curr = v_char255.

You need to be careful about occupied length of your v_char255 and I am assuming that you only have numbers, ',' and '.' in this field.

Srinivas

4 REPLIES 4

Former Member
0 Kudos

You have to do the following.


shift v_char255 left deleting leading spaces.
translate v_char255 using ', '.
condense v_char255 no-gaps.
v_curr = v_char255.

You need to be careful about occupied length of your v_char255 and I am assuming that you only have numbers, ',' and '.' in this field.

Srinivas

0 Kudos

Hi Srinivas

Thanks for your help, it worked perfect.

Regards

Gabriel P.

0 Kudos

Wonderful. Can you please reward and close the post?

Thanks,

Srinivas

Former Member
0 Kudos

Hi

You should give us more details: which kind of data have you in your variable? How is data format?

Max