|
Mark Walter wrote: > ... > D fiscalYr 4 0 overlay(dsfiscal:*next) > > > c eval headdesc = Center('Fixed Model FY ' + > c %editc(fiscalYr - 1:'X'):40) > The output looks like this: > Fixed Model FY 02001 > >If I use the 'Z' edit code, it trims the zero but why is the zero there in >the first place? The problem could be solved by using %dec to control the length of the result: %editc(%dec(fiscalYr-1:4:0):'X') By the way, the length of a literal is the number of digits, so the length of 1 is one ... Unless the literal is used in an integer-only expression; then the length of 1 is ten or twenty, depending on the release and H spec options. http://publib.boulder.ibm.com/html/as400/v5r1/ic2924/books/c0925083.pdf "Chapter 21. Expressions" then "Precision rules for numeric operations" then "Precision of intermediate results". Barbara Morris
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.