Author: Rijit
Subject: Reply to: How to add % towards the end of my field value
Posted: Tue May 10, 2016 4:20 pm (GMT 5.5)
I would say you can try this approach and see if works.
>> In working storage set a literal lit1 x(1) to a value of %
>>move the value 123456 or whatever into a alphanumeric variable
var1 x(15) . Instead of 123456 it could be 123456789 also.
If the length of Var1 < 15 do below operation
>>String Var1 delimited by space with lit1 delimited by size into a new output variable which is also x(15)
Else
Continue
Endif
_________________
Many Thanks
Subject: Reply to: How to add % towards the end of my field value
Posted: Tue May 10, 2016 4:20 pm (GMT 5.5)
I would say you can try this approach and see if works.
>> In working storage set a literal lit1 x(1) to a value of %
>>move the value 123456 or whatever into a alphanumeric variable
var1 x(15) . Instead of 123456 it could be 123456789 also.
If the length of Var1 < 15 do below operation
>>String Var1 delimited by space with lit1 delimited by size into a new output variable which is also x(15)
Else
Continue
Endif
_________________
Many Thanks