Ever since I started working with RPG I have moved a chracter field value to a numeric field via the foloowing method. Is there a better way to do it now we have free format version 5 RPG IV?
*
*
* Convert Char To Number
DD1 DS
DD1CHAR 1 2
DD1NO 1 2 0
*
* Will Give Us 33
DW1RESULT 2 0
/FREE
EVAL D1CHAR = '23';
EVAL RESULT = 10 + D1NO; // Result = 33 //
/END-FREE
*
*
* Convert Char To Number
DD1 DS
DD1CHAR 1 2
DD1NO 1 2 0
*
* Will Give Us 33
DW1RESULT 2 0
/FREE
EVAL D1CHAR = '23';
EVAL RESULT = 10 + D1NO; // Result = 33 //
/END-FREE