|
I'm not aware of a way to trap the MCH1202 abend in the COBOL program. You just
need to code your program to prevent them from occurring in the first place.
Doing a numeric check on all un-trusted fields that are defined as COMP-3
before you do math with them will prevent data decimal errors.
Like so,
05 W-PACKED-NUM PIC 9(05) COMP-3.
IF W-PACKED-NUM NUMERIC
ADD +1 TO W-PACKED-NUM
ELSE
DISPLAY "VALUE OF W-PACKED-NUM IS NOT NUMERIC"
SET W-ERROR-SWITCH TO TRUE
END-IF
-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx [mailto:cobol400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Garcia, Luis
Sent: Monday, July 11, 2005 6:09 PM
To: 'COBOL Programming on the iSeries/AS400'
Subject: RE: [COBOL400-L] Is it possible to treat any message of the type
MCH1202 generated by a program COBOL ?
It would be great if it's possible to get more information from the errors,
we had to deal with this error, an after a while we figured it out, it was
because a numeric field was receiving a null value on the screen.
-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx
[mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of dnddnd01@xxxxxxxx
Sent: Monday, July 11, 2005 11:42 AM
To: cobol400-l@xxxxxxxxxxxx
Subject: [COBOL400-L] Is it possible to treat any message of the type
MCH1202 generated by a program COBOL ?
Is it possible to intercept any message of the type MCH1202 generated by a
program COBOL ?
Thank you in advance for your assistance.
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.