@@ -137,9 +137,9 @@ func discoverClasses(metaPrefix string) error {
137137
138138 // Have to know the starting point for the topic that tells about classes
139139 if metaPrefix == "" {
140- rootTopic = "$SYS/MQ/INFO/QMGR/" + qMgr . Name + "/Monitor/METADATA/CLASSES"
140+ rootTopic = "$SYS/MQ/INFO/QMGR/" + resolvedQMgrName + "/Monitor/METADATA/CLASSES"
141141 } else {
142- rootTopic = metaPrefix + "/INFO/QMGR/" + qMgr . Name + "/Monitor/METADATA/CLASSES"
142+ rootTopic = metaPrefix + "/INFO/QMGR/" + resolvedQMgrName + "/Monitor/METADATA/CLASSES"
143143 }
144144 sub , err = subscribe (rootTopic )
145145 if err == nil {
@@ -296,6 +296,11 @@ func discoverStats(metaPrefix string) error {
296296 // Start with an empty set of information about the available stats
297297 Metrics .Classes = make (map [int ]* MonClass )
298298
299+ // Allow us to proceed on z/OS even though it does not support pub/sub resources
300+ if metaPrefix == "" && platform == ibmmq .MQPL_ZOS {
301+ return nil
302+ }
303+
299304 // Then get the list of CLASSES
300305 err = discoverClasses (metaPrefix )
301306
@@ -418,6 +423,8 @@ func inquireObjects(objectPatternsList string, objectType int32) ([]string, erro
418423 putmqmd .Report = ibmmq .MQRO_PASS_DISCARD_AND_EXPIRY
419424
420425 cfh := ibmmq .NewMQCFH ()
426+ cfh .Version = ibmmq .MQCFH_VERSION_3
427+ cfh .Type = ibmmq .MQCFT_COMMAND_XR
421428
422429 // Can allow all the other fields to default
423430 cfh .Command = command
@@ -572,6 +579,10 @@ func ProcessPublications() error {
572579 var elementidx int
573580 var value int64
574581
582+ if platform == ibmmq .MQPL_ZOS {
583+ return nil
584+ }
585+
575586 // Keep reading all available messages until queue is empty. Don't
576587 // do a GET-WAIT; just immediate removals.
577588 cnt := 0
0 commit comments