|
On 03/10/99 03:22:19 PM VENU YAMAJALA wrote: >In CRTRPGPGM command, we have a keyword IGNDECERR. Is there any such equivalent >one in CRTBNDRPG? I have an ILE pgm which is moving a packed value into a alpha >and for some records (where we have invalid data) I am getting Decimal Data >Error. Thinkning of compiling the ILE pgm sing IGNDECERR but could not find it. >Any help/suggestions is appreciated. TIA. DO NOT USE IGNDECERR! Yes, I feel strongly about this. :-) If you have invalid data in your numeric fields you should fix the data, not pass it along. Try this program if you don't think this is a serious problem: F* Test IGNDECERR. Compile with IGNDECERR(*YES) F* Guess how many messages you'll get? I DS I 1 5 CHAR I 1 50NUM C* Load decimal data error into NUM C MOVE '$#@!*' CHAR C MOVEL'QSYSOPR' MSGQ 10 P C* C NUM IFEQ 0 C 'Zero' DSPLYMSGQ C ENDIF C* C NUM IFGT 0 C 'Greater' DSPLYMSGQ C ENDIF C* C NUM IFLT 0 C 'Less' DSPLYMSGQ C ENDIF C* C SETON LR All three tests will evaluate to true! You will see all three messages issued. You really should TESTN your field and handle the error before it happens. Having said all that, in RPG IV, you can use FIXDECERR but be warned - this will set the invalid data to zero AND issue a message to the job log every time it does. If you have a million records and there are 5 fields in error on each record you will get 5 million messages in the job log. This will kill your performance. I hope this helps Buck Calabro Billing Concepts Inc (formerly CommSoft), Albany, NY mailto:mcalabro@commsoft.net +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.