|
Hans said: >Well, if %EDITW does what you want, then >why not just use that? > >But if you want to avoid %EDITW, then >you can always try: >%xlate(' ':'0':%editc(num:'3')) Which requires a V5 OS/400 release. The request didn't mention them, but %xlate doesn't handle negative numbers. If, for instance the input number was -12.34, you would probably use the L edit code, which would result in 00012.34- If you use an L edit code on a positive number like 12.34 you would get 00012.340, because of the trailing space where the sign would go. Of course you could wrap that up in a test and use edit code 3 for positive numbers and L for negative numbers, but why go through that? Hans' comment about %editw makes sense to me. --buck
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.