Matthew Roessner
Matthew Roessner used Ask the Experts™
Does anyone know how I can force a certain message ID (MCH1210) to be displayed in the QSYSOPR message queue?  Our developers are asking that we direct anytime this message comes up - to make it show up on the QSYSOPR MSGQ.  Is this possible?  They don't want to dump the message as it is a lot of work to go through each of our servers and have to answer the messages and go through the dumps. They would like it to be "documented" on the QSYSOPR MSGQ so that they can go back and just search that MSGQ at a later time to see what was going on with the issue.

Any guidance would be much appreciated.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Theo KouwenhovenApplication Consultant

If you have the Jobname and job number, your developers can find it in the history of your job with the DSPJOB command
Don't let them tell you they can't, because they can without any problem easy end quick
VP Technology / Senior Consultant
Hi Matthew.  The OS automatically sends certain messages to QSYSOPR.  

If a programmer wants a program to log a message to QSYSOPR, then they need to write code to send it there.  In a CL program, for example, you could MONMSG for MCH1210, RCVMSG it in your CL error handler, and then re-send it  (SNDPGMMSG) to QSYSOPR.  You'd use similar techniques to monitor in RPG, COBOL, SQL, etc.  For a batch program, sending to the *EXT message queue will send the message to the QSYSOPR message queue.  If this is just happening in a few programs, that is an easy modification.  If it is happening in a lot of different programs, then that might be a problem.

Is the message being issued as a *DIAG, *ESCAPE, or *COMP message in the problem job(s)?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial