cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Converting from integer to character.

Former Member
33,198

Hi,

I need to convert an integer to a 10 digit character.Could you help me to know how I could do it?

e.g. if the integer is 6000034, the converted value must be 0006000034.

I need to have the leading zereos.

Thanks,

Sandeep.

View Entire Topic
retired_member
Product and Topic Expert
Product and Topic Expert

And nowadays you simply write:

text = |{ CONV string( num ) WIDTH = 10 ALPHA = IN }|.


or


TYPES numc TYPE n LENGTH 10.

text = CONV numc( num ).