|
If the field being edited is 4-digits, then %editc(myVar : 'X') will return 0000 that is 4-digits with leading zeros in place. -Bob Cozzi www.RPGxTools.com RPG xTools - Enjoy programming again. -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bruce Guetzkow Sent: Friday, October 14, 2005 3:54 PM To: rpg400-l@xxxxxxxxxxxx Subject: RE: RPG400-L Digest, Vol 4, Issue 1225 Ben: <snip> Actually, the resulting character string needs to have at least 4 digits because all of our items in our item master are coded that way (not my decision obviously). Now that I think about it though, I could have probably used %trim(%editw(numItem : 'b0bbbb')) {b=blank} instead of %editc, right? </snip> I suppose if I had read "ALL" of your code, I would have seen that you had a legitimate reason for what you were doing. From what I see it looks like your item number is in a 10/0 field and you don't want all of the leading zeros, just a minimum of 4-bytes returned. My suggestion would ALWAYS give the max field length with ALL leading zeros. Your idea might work (you'd have to give it a try) but as the saying goes, "if it ain't broke...". Sorry for the confusion (and what's that size 10 doing in my mouth?). --Bruce Guetzkow
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.