Keep Leading Zeroes in Character Field

joann.l.olsen@us.abb.com joann.l.olsen@us.abb.com
Thu, 5 Apr 2001 10:50:38 -0500


I need to convert a character field to a numeric field, but keep the leading
zeroes.  If the nconvert is used, it drops the leading zeroes.  How can that be
accomplished?  We are on an AS/400.

Example:  subledger  char*8 = 00100241
                     def D-NUM num*8 = nconvert(subledger)

The results in D-NUM is 100241

Thanks