Jim, It is the MONMSG CPF0000 EXEC(RETURN) that I am talking about. My point is if you are going to trap errors, do something with them! Don't just swallow them! And if all you are doing is percolating them down the call stack, why don't you just let OS/400 do that for you? Less work and sometimes you can fix what is wrong and take a retry. It is possible and even sometimes needed to do a global MONMSG "safely". But most of the time, it is not done safely. And even if it is done safely to start with, over time, it tends to degrade (as more pgmrs get their fingers into the code). Bob -----Original Message----- From: James W Kilgore [SMTP:email@example.com] Sent: Tuesday, October 05, 1999 10:27 PM To: MIDRANGE-L@midrange.com Subject: Re: global MONMSG to catch everything Whoa, Bob, I won't even go into the 17 year old testosterone driven arena =:-0, but IMHO, there is nothing "evil" about trapping "MCH0000" errors. Or any other errors. It's not so much as "what" is trapped, as "how" it's trapped. If an RPG program pops up a "invalid array index" error. It's not a problem unless one does not program in a graceful out. I agree, only a twit would code MONMSG(CPF0000) RETURN as a first level error trapping. Ever since Q38 was published, there have been CL programs to percolate the error up to the caller. Maybe it's time to make something old "new" again? Bob Crothers wrote: > > Dan, > > CPF0000 will catch them all. MCH, SQL, RPG, etc messages if not > caught (monmsg'd) will cause a CPF9999 message..and that will get > caught by the CPF0000. > > BUT PLEASE BE CAREFULL! What you are talking about doing is VERY > dangerous! And unfortunately, the shops that have the biggest > problems with unhandled escape messages are then ones that SHOULD NOT > USE THIS TECHNIQUE! This is because if you can't trust your > programmers (or vendor) to produce software that runs clean, how can > you trust them to SAFELY implement something like a global MONMSG > CPF0000???? > > Kind of like thinking that giving your 17yr old boy a condom will > protect him from AIDS & Paternity suits. Knowing how to do something > safely is not the same as doing something safely! > > Bob > +--- | 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: firstname.lastname@example.org +--- +--- | 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: email@example.com +---
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.