Keep Leading Zeroes in Character Field

Karman, Al AKarman@USFreightways.com
Thu, 5 Apr 2001 11:11:44 -0500


Joann,

Try

def D-NUM num*8 significance 8 pic '^^^^^^^^'  = nconvert(subledger


Al Karman
IT Consultant
US Freightways 
akarman@usfreightways.com
773.824.2284


-----Original Message-----
From: joann.l.olsen@us.abb.com [mailto:joann.l.olsen@us.abb.com]
Sent: Thursday, April 05, 2001 10:51 AM
To: powerh-l@lists.swau.edu
Subject: Keep Leading Zeroes in Character Field




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



= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.