Update to Java MQ PCF Code Samples

Tim Zielke posted a comment to my blog posting of Java MQ Code to List Channel Status about an extra PCF response from a z/OS queue manager that caused the code to throw an exception.

So, I updated line # 156 in MQListChannelStatus01.java to be:

if ( ((responses[i]).getCompCode() == CMQC.MQCC_OK) &&
     ((responses[i]).getParameterValue(CMQCFC.MQCACH_CHANNEL_NAME) != null) )

You can download the updated source code for MQListChannelStatus01.java from here.

I made the same change for MQ Channel Monitor. Line # 325 of PCFChlStatus.java.

The same problem will also hit MQListQueueStatus01.java from my blog posting of Java MQ Code to List Queue Status. So, I updated line # 165 to be:

if ( ((responses[i]).getCompCode() == CMQC.MQCC_OK) &&
     ((responses[i]).getParameterValue(CMQC.MQCA_Q_NAME) != null) )

You can download the updated source code for MQListQueueStatus01.java from here.

Regards,
Roger Lacroix
Capitalware Inc.

This entry was posted in IBM i (OS/400), IBM MQ, Java, Linux, macOS (Mac OS X), Open Source, PCF, Programming, Unix, Windows, z/OS.

One Response to Update to Java MQ PCF Code Samples