Send MSGID to QSYSOPR MSGQ

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.

Thanks
LVL 1
Matthew RoessnerSenior Systems ProgrammerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Theo KouwenhovenApplication ConsultantCommented:
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
Gary PattersonVP Technology / Senior Consultant Commented:
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)?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBMi

From novice to tech pro — start learning today.