× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks to everyone for your input. I must admit I learned something new about how monitor group behave. I'll take everyone's advise into consideration in the future when coding monitor groups.

Thanks again,

Rob

On 7/1/2015 4:12 PM, Scott Klement wrote:
Robert,

Monitor groups always log their errors to the job log (no matter what the error happens to be -- this is not unique to divide by zero.)

This can be very handy for troubleshooting problems... and is a feature I really appreciate.

I have a subprocedure in a service program that will remove the error messages from the job log. So I can have some logic in there that if it's an error I'm expecting, I'll remove the messages (gets rid of useless clutter in the job log) but if it's an unexpected error, I'll leave it in there for diagnostic purposes. Works very nicely.

You're right that this does have an impact on performance. You should not use this to catch divide by zero errors if you expect them to happen frequently... I usually use an 80/20 rule. If I expect an error to occur less than 20% of the time, it's a candidate for a MONITOR. If the error will occur more often than that, I write code that anticipates the error and fixes it in advance...

if myfield = 0;
result = 0;
else;
result = somefield / myfield;
endif;

If myField=0 is expected to happen freuently, this will run MUCH MUCH faster than monitoring for the condition...

-SK


On 7/1/2015 2:11 PM, Robert Rogerson wrote:
Hi all,

I was somewhat surprised to find that a divide by zero error inside a
monitor group still wrote/added an error/message to the joblog. The
message I'm referring to is
MCH1211 Escape 40 Message . . . . : Attempt made to divide by zero for
fixed point operation.

I was pointed to this error as the reason for the program abending, but
when I checked (the specific line specified in the message) in the
program it was within a monitor group, so it was already being handled.
In the end the issue was elsewhere in the program.

With that being said, my question is, doesn't writing to the joblog take
up processing time and isn't this message misleading when the program is
already handling the error within a monitor group?
I know that checking the divisor before doing the divide operation would
avoid this issue, but I thought this was one of the purposes of the
monitor group.

Thanks,

Rob


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.