MQ Explorerがインストールされていなくても、IBM MQのキューのデータを確認することは可能です。
キュー・マネージャーの名前が QUEUE.MANAGER.1 で、キューの名前が QUEUE1 であるとき、次のコマンドで格納されているデータを確認することができます。
amqsbcg QUEUE1 QUEUE.MANAGER.1
確認
キューに次のようにデータを格納しました。
> .\amqsput QUEUE1 QUEUE.MANAGER.1 Sample AMQSPUT0 start target queue is QUEUE1 test message 1 2 3 gggggggggggggggggggggg test message 2 Sample AMQSPUT0 end
格納されているデータを確認します。
> .\amqsbcg QUEUE1 QUEUE.MANAGER.1 AMQSBCG0 - starts here ********************** MQOPEN - 'QUEUE1' MQGET of message number 1, CompCode:0 Reason:0 ****Message descriptor**** StrucId : 'MD ' Version : 2 Report : 0 MsgType : 8 Expiry : -1 Feedback : 0 Encoding : 546 CodedCharSetId : 437 Format : 'MQSTR ' Priority : 0 Persistence : 0 MsgId : X'414D512051554555452E4D414E414745AED7E85E22940402' CorrelId : X'000000000000000000000000000000000000000000000000' BackoutCount : 0 ReplyToQ : ' ' ReplyToQMgr : 'QUEUE.MANAGER.1 ' ** Identity Context UserIdentifier : 'Administrato' AccountingToken : X'16010515000000F85FAAC20A1F2C4188C4031EF401000000000000000000000B' ApplIdentityData : ' ' ** Origin Context PutApplType : '11' PutApplName : '\c\Samples\Bin64\amqsput.exe' PutDate : '20200616' PutTime : '15343272' ApplOriginData : ' ' GroupId : X'000000000000000000000000000000000000000000000000' MsgSeqNumber : '1' Offset : '0' MsgFlags : '0' OriginalLength : '-1' **** Message **** length - 14 of 14 bytes 00000000: 7465 7374 206D 6573 7361 6765 2031 'test message 1 ' MQGET of message number 2, CompCode:0 Reason:0 ****Message descriptor**** StrucId : 'MD ' Version : 2 Report : 0 MsgType : 8 Expiry : -1 Feedback : 0 Encoding : 546 CodedCharSetId : 437 Format : 'MQSTR ' Priority : 0 Persistence : 0 MsgId : X'414D512051554555452E4D414E414745AED7E85E22940403' CorrelId : X'000000000000000000000000000000000000000000000000' BackoutCount : 0 ReplyToQ : ' ' ReplyToQMgr : 'QUEUE.MANAGER.1 ' ** Identity Context UserIdentifier : 'Administrato' AccountingToken : X'16010515000000F85FAAC20A1F2C4188C4031EF401000000000000000000000B' ApplIdentityData : ' ' ** Origin Context PutApplType : '11' PutApplName : '\c\Samples\Bin64\amqsput.exe' PutDate : '20200616' PutTime : '15343479' ApplOriginData : ' ' GroupId : X'000000000000000000000000000000000000000000000000' MsgSeqNumber : '1' Offset : '0' MsgFlags : '0' OriginalLength : '-1' **** Message **** length - 1 of 1 bytes 00000000: 32 '2 ' MQGET of message number 3, CompCode:0 Reason:0 ****Message descriptor**** StrucId : 'MD ' Version : 2 Report : 0 MsgType : 8 Expiry : -1 Feedback : 0 Encoding : 546 CodedCharSetId : 437 Format : 'MQSTR ' Priority : 0 Persistence : 0 MsgId : X'414D512051554555452E4D414E414745AED7E85E22940404' CorrelId : X'000000000000000000000000000000000000000000000000' BackoutCount : 0 ReplyToQ : ' ' ReplyToQMgr : 'QUEUE.MANAGER.1 ' ** Identity Context UserIdentifier : 'Administrato' AccountingToken : X'16010515000000F85FAAC20A1F2C4188C4031EF401000000000000000000000B' ApplIdentityData : ' ' ** Origin Context PutApplType : '11' PutApplName : '\c\Samples\Bin64\amqsput.exe' PutDate : '20200616' PutTime : '15343519' ApplOriginData : ' ' GroupId : X'000000000000000000000000000000000000000000000000' MsgSeqNumber : '1' Offset : '0' MsgFlags : '0' OriginalLength : '-1' **** Message **** length - 1 of 1 bytes 00000000: 33 '3 ' MQGET of message number 4, CompCode:0 Reason:0 ****Message descriptor**** StrucId : 'MD ' Version : 2 Report : 0 MsgType : 8 Expiry : -1 Feedback : 0 Encoding : 546 CodedCharSetId : 437 Format : 'MQSTR ' Priority : 0 Persistence : 0 MsgId : X'414D512051554555452E4D414E414745AED7E85E22940405' CorrelId : X'000000000000000000000000000000000000000000000000' BackoutCount : 0 ReplyToQ : ' ' ReplyToQMgr : 'QUEUE.MANAGER.1 ' ** Identity Context UserIdentifier : 'Administrato' AccountingToken : X'16010515000000F85FAAC20A1F2C4188C4031EF401000000000000000000000B' ApplIdentityData : ' ' ** Origin Context PutApplType : '11' PutApplName : '\c\Samples\Bin64\amqsput.exe' PutDate : '20200616' PutTime : '15343877' ApplOriginData : ' ' GroupId : X'000000000000000000000000000000000000000000000000' MsgSeqNumber : '1' Offset : '0' MsgFlags : '0' OriginalLength : '-1' **** Message **** length - 22 of 22 bytes 00000000: 6767 6767 6767 6767 6767 6767 6767 6767 'gggggggggggggggg' 00000010: 6767 6767 6767 'gggggg ' MQGET of message number 5, CompCode:0 Reason:0 ****Message descriptor**** StrucId : 'MD ' Version : 2 Report : 0 MsgType : 8 Expiry : -1 Feedback : 0 Encoding : 546 CodedCharSetId : 437 Format : 'MQSTR ' Priority : 0 Persistence : 0 MsgId : X'414D512051554555452E4D414E414745AED7E85E22940406' CorrelId : X'000000000000000000000000000000000000000000000000' BackoutCount : 0 ReplyToQ : ' ' ReplyToQMgr : 'QUEUE.MANAGER.1 ' ** Identity Context UserIdentifier : 'Administrato' AccountingToken : X'16010515000000F85FAAC20A1F2C4188C4031EF401000000000000000000000B' ApplIdentityData : ' ' ** Origin Context PutApplType : '11' PutApplName : '\c\Samples\Bin64\amqsput.exe' PutDate : '20200616' PutTime : '15344373' ApplOriginData : ' ' GroupId : X'000000000000000000000000000000000000000000000000' MsgSeqNumber : '1' Offset : '0' MsgFlags : '0' OriginalLength : '-1' **** Message **** length - 14 of 14 bytes 00000000: 7465 7374 206D 6573 7361 6765 2032 'test message 2 ' No more messages MQCLOSE MQDISC
確認することが出来ました。