I am writing a CL program which is going to encounter a lot of errors, due to the fact that it will be executed in environments with all sorts of problems like missing objects (yes, that is deliberate). Instead of monitoring these possible messages and bypass the errors, I actually would like to redirect these messages so that they can be used the program messages and displayed to the user. So what I want is that after the program execution, the program puts all the error messages onto display on the bottom of the screen rather than having them pop up and disrupt the execution. Is it possible to do so? How?
Share
This is my standard CL error handling process. Generally, I would use MONMSG inline to handle errors I expect might be coming. Also generally, for errors I expect, I do not normally tell the end user about them. If you need to do that, make the RCVMSG/SNDPGMMSG pairs into a subroutine and call that inline to percolate the errors to the caller. The idea is to receive the diagnostic messages and re-send them to the caller, then do the same with the exception message.
EDIT: Add subfile message queue to answer.
Perhaps a subfile message queue?
DDS:
CLP: