Skip to content

Commit 3c8efed

Browse files
committed
Improve error message when connecting to z/OS
1 parent ed452c0 commit 3c8efed

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mqmetric/mqif.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ func initConnectionKey(key string, qMgrName string, replyQ string, replyQ2 strin
221221
ibmmq.MQIA_MAX_HANDLES,
222222
ibmmq.MQIA_PLATFORM}
223223
if cc.UseStatistics {
224+
// We don't know yet what the platform is.
225+
// If it turns out to be z/OS, the MQINQ will fail, but that's OK:
226+
// You would have to correct the configuration to not use these events.
224227
selectors = append(selectors, ibmmq.MQIA_STATISTICS_MQI)
225228
}
226229

@@ -267,6 +270,9 @@ func initConnectionKey(key string, qMgrName string, replyQ string, replyQ2 strin
267270
}
268271
} else {
269272
errorString = "Cannot inquire on queue manager object"
273+
if cc.UseStatistics {
274+
errorString += ". Cannot set the useStatistics option for z/OS queue managers"
275+
}
270276
mqreturn = err.(*ibmmq.MQReturn)
271277
}
272278
} else {

0 commit comments

Comments
 (0)