|
On Wed, 2005-06-15 at 18:57, rob@xxxxxxxxx wrote: > Joel, > > You did an outstanding job explaining Monitor. Thanks Rob, I hope more people will give it a try... > You think the people who either don't understand, or out-and-out fight > Monitor, would scream their lungs out if IBM dropped support for MONMSG in > CL? Good point, I forgot to point out MONMSG. I also didn't mention that you can monitor for specific messages like MONMSG as well: monitor ; // do something on-error 02101 ; // handle that error endmon ; And you can have multiple on-error blocks: monitor ; // do something on-error 02101 ; // handle that error on-error 04321 ; // handle that error on-error ; // handle any others endmon ; And you can handle special values and multiple error conditions: <from the RPG Programmer's Guide:> monitor ; read file ; on-error 1211 ; // handle file not open on-error *FILE ; // handle other file errors on-error 00100 : 00121 ; // handle string error and array index error on-error ; // handle all other errors endmon ; Monitor really is one of the best, most underused facilities in RPG. Joel http://www.rpgnext.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.