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: 

int to char conversion

Former Member
0 Kudos

problem is of alignment i think. i mean int is right alighned and char is left aligned...so when i move it result is not coming properly...

char_v+65 = int_v.

char_v is filled upto 64 places and we want to concatenate int_v at the end of chae_v.

Message was edited by: Madan Gopal Sharma

Message was edited by: Madan Gopal Sharma

6 REPLIES 6

Former Member
0 Kudos

Try this:

write:/ YourValue RIGHT-JUSTIFIED.

Reward points accordingly.

vinod_gunaware2
Active Contributor
0 Kudos

Use write statement with to and RIGHT/LEFT-JUSTIFIED.

regards

vinod

Former Member
0 Kudos

Hi,

Use direct assignment.

1.e lv_char = lv_int.

problem will be solved.

Mark the helpfull answers & close the thread

Regards

Former Member
0 Kudos

Hi madan,

1. we have to move this integer variable

to character variable.

2. then we should use CONDENSE.

3. then we should use CONCATENATE.

4. like this (just copy paste in new program)

report abc.

*----


data : str(100) type c.

data : nstr(15) type c.

data : num type i.

*----


str = 'ABCDEFGHIJKL'.

num = 76.

*----


write 😕 str.

write 😕 num.

*----


IMPORTANT

nstr = num.

condense nstr.

concatenate str nstr into str.

write 😕 str.

regards,

amit m.

0 Kudos

HI,

Try this way

char_v+65 = int_v.

write : char_v <b>RIGHT JUSTIFIED.</b> . Hope this clears your Problem.

Regards,

Santosh

0 Kudos

Madan,

Has your issue been resolved?

If so, please reward points and close the thread.

If not, plz provide more details.