I wanted move Numeric Field to Character field. I am using Free format RPGLE Program. I have used %Char to do this operation. It is moving 2 to Character field, While trying to move 02 to Character field. I am expecting '02' in Character field How to achieve this in Free format RPGLE Program?
Software/Hardware used:
ASKED:
November 19, 2009 8:02 AM
UPDATED:
November 20, 2009 1:55 AM
use a data structure with the numeric field “redefined” as a character field …
move your numeric field to the data structure numeric field … then take the value
in the data structure character field …
D DS
D NUM 1 2 0
D CHAR 1 2
that sould have been CharFld = %editw( MyFld : ’0 ‘;
Phil