|
Jeffrey Young wrote: > > Dan, > RPG IV has the same feature but even better. > The IGNDECERR(*YES) feature did not fix bad data, just ingored the field and > left whatever was in it previously. > RPG IV has the FIXNBR keyword that allows you to specify *ZONED , > *INPUTPACKED or both and will actualy set the field value to ZERO if invalid > numeric found. > > *INPUTPACKED sets the value to zero. *ZONED actually does some fixup. Say a zoned field has the hex value x'F152FDDE' then the system will replace any invalid zones with 'F' and any invalid digits with 0 but will leave the rest as is. That value above would be fixed like this: x'F1F2F0D0' x x x giving a value of -1200. I agree that FIXNBR is better than IGNDECERR, since it doesn't leave the bad data or propagate it to other fields. But I still would not use it, since it not only fixes up the bad data where you expect to have it, but also silently fixes up all the other bad data caused by coding errors in your programs, or by new files that you wouldn't expect to have bad data. (At least *ZONED is silent; *INPUTPACKED leaves a nice messy trail in your joblog.)
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.