Keep Leading Zeroes in Character Field

Lyn Blansett blansett@Harding.edu
Thu, 05 Apr 2001 12:46:58 -0600 (CST)


To show the leading zeros when reporting a numeric field,
  try adding the following to your Report item or Field statement.

 PIC "^^^^^^^^" FILL '0'

This should give you the desired result.

:) Lyn 


On Thu, 5 Apr 2001 joann.l.olsen@us.abb.com wrote:

> 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
> 

===============================================================
      Ann C. "Lyn" Blansett  |  H A R D I N G  University
     <blansett@harding.edu>  |  Information Technology Services
===============================================================
      Any personal views expressed in this message do not
     necessarily represent the views of Harding University.