IC SunsetThe developerWorks Connections platform will be sunset on January 2, 2020. This forum will no longer be available unless an extension has been requested. More details available on our FAQ.
  • No replies
1 Post

Pinned topic Can AMQ messages be monitored via MONMSG in an iSeries CL program

‏2017-07-27T22:09:01Z | *pgm cl websphere amq as400 iseries monmsg mq

I have a compiled CL program that executes an MQ control command using
If there is a problem with an MQ control command param, I want to catch the error msg
using the CL command MONMSG MSGID(xxx). Testing shows that msg ID
CPF0006 (command failed) or any other CPF code can be monitored and caught,
but AMQ msg ID's, such as AMQ8168 (User profile name not found), can not.
One web doc I found "Using MQSeries on the AS/400" [1] has a CL program
example to stop a qmgr example showing this line
that purports to monitor an AMQ message.

Here's an exact sample extract from my CL program:

  MONMSG MSGID(AMQ8168) +                         
       MSGDTA('User profile name not found RC(AMQ8168)'))

I'm aware that MSGDATA example should have param values to fill in to the actual AMQ msg template,
but the syntax is correct, it compiles ok, but the AMQ msg, though seen in the calling application's
job log, is not caught in the CL program.

Anyone have related experience and the answer?
Is there a CL trick that I'm unaware of?

Any newer references with the answer?

[1] http://www.astradyne.net/manuals/ir028420.pdf
July 1998, pg. 209

Updated on 2017-07-27T22:10:28Z at 2017-07-27T22:10:28Z by spiceman2