ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » MQ v9.c System Stats PCF Message and Python

Post new topic  Reply to topic
 MQ v9.c System Stats PCF Message and Python « View previous topic :: View next topic » 
Author Message
bobbee
PostPosted: Wed Jun 03, 2020 11:12 am    Post subject: MQ v9.c System Stats PCF Message and Python Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
Location: Tampa

Got a Python PCF processing code aand I ran it against a message generated with the following subscription. I get the following error. I thought is was the BYTE/STRING issue in Python. I tried converted to string but got an issue at byte 44.

Code:

{'StrucId': 'MD', 'Version': 1, 'Report': 'NONE', 'MsgType': 'DATAGRAM', 'Expiry': 34675, 'Feedback': 'NONE', 'Encoding': 546, 'CodedCharSetId': 437, 'Format': 'MQHRF2', 'Priority': 0, 'Persistence': 'NOT_PERSISTENT', 'MsgId': '0x414d5120424f424245452020202020204ca5d75e000fa420', 'CorrelId': '0x414d5120424f424245452020202020204ca5d75e20a40ce7', 'BackoutCount': 0, 'ReplyToQ': '', 'ReplyToQMgr': 'BOBBEE', 'UserIdentifier': 'BOBBEEBRODER', 'AccountingToken': '0x0000000000000000000000000000000000000000000000000000000000000000', 'ApplIdentityData': '', 'PutApplType': 'QMGR_PUBLISH', 'PutApplName': 'BOBBEE', 'PutDate': '20200603', 'PutTime': '19001741', 'ApplOriginData': '', 'GroupId': '0x000000000000000000000000000000000000000000000000', 'MsgSeqNumber': 1, 'Offset': 0, 'MsgFlags': 0, 'OriginalLength': -1}

[b]b'\x15\x00\x00\x00$\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x04\x00\x00\x00D\x00\x00\x00\xdf\x07\x00\x00R\x03\x00\x000\x00\x00\x00BOBBEE                                          \x03\x00\x00\x00\x10\x00\x00\x00G\x03\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x10\x00\x00\x00H\x03\x00\x00\x02\x00\x00\x00\x17\x00\x00\x00\x18\x00\x00\x00M\x03\x00\x00\x01\x00\x00\x00\x8d \x99\x00\x00\x00\x00\x00\x17\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\xc5U\x02\x00\x00\xc0\xf4\t\x00\x00\x00\x00\x17\x00\x00\x00\x18\x00\x00\x00\x01\x00\x00\x00\x10\x00\x00\x00\x00\xc0\xeb\x11\x00\x00\x00\x00\x17\x00\x00\x00\x18\x00\x00\x00\x04\x00\x00\x00\xc5U\x02\x00\x000\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x18\x00\x00\x00\x05\x00\x00\x00\x03\x00\x00\x00\x86\x07\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x10\x00\x00\x00\x06\x00\x00\x003\x06\x00\x00\x03\x00\x00\x00\x10\x00\x00\x00\x0c\x00\x00\x00p\x14\x00\x00\x03\x00\x00\x00\x10\x00\x00\x00\x07\x00\x00\x00q\x00\x00\x00\x03\x00\x00\x00\x10\x00\x00\x00\x08\x00\x00\x00q\x00\x00\x00'[/b]
{"sReason": "????", "MQMD": {"StrucId": "MD", "Version": 1, "Report": "NONE", "MsgType": "DATAGRAM", "Expiry": 34675, "Feedback": "NONE", "Encoding": 546, "CodedCharSetId": 437, "Format": "MQHRF2", "Priority": 0, "Persistence": "NOT_PERSISTENT", "MsgId": "0x414d5120424f424245452020202020204ca5d75e000fa420", "CorrelId": "0x414d5120424f424245452020202020204ca5d75e20a40ce7", "BackoutCount": 0, "ReplyToQ": "", "ReplyToQMgr": "BOBBEE", "UserIdentifier": "BOBBEEBRODER", "AccountingToken": "0x0000000000000000000000000000000000000000000000000000000000000000", "ApplIdentityData": "", "PutApplType": "QMGR_PUBLISH", "PutApplName": "BOBBEE", "PutDate": "20200603", "PutTime": "19001741", "ApplOriginData": "", "GroupId": "0x000000000000000000000000000000000000000000000000", "MsgSeqNumber": 1, "Offset": 0, "MsgFlags": 0, "OriginalLength": -1}, "msg": {"body": "0x15000000240000000300000000000000010000000100000000000000000000000c0000000400000044000000df0700005203000030000000424f42424545202020202020202020202020202020202020202020202020202020202020202020202020202020202020030000001000000047030000010000000300000010000000480300000200000017000000180000004d030000010000008d20990000000000170000001800000000000000c555020000c0f409000000001700000018000000010000001000000000c0eb1100000000170000001800000004000000c555020000300000000000001700000018000000050000000300000086070000000000000300000010000000060000003306000003000000100000000c000000701400000300000010000000070000007100000003000000100000000800000071000000"}, "time": "2020-06-03 14:02:30.020854", "delta": "0:00:00"}
[/b]
Back to top
View user's profile Send private message Send e-mail AIM Address
hughson
PostPosted: Wed Jun 03, 2020 5:31 pm    Post subject: Re: MQ v9.c System Stats PCF Message and Python Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
Location: Bay of Plenty, New Zealand

It would be helpful in your question to say what your PCF processing code did.

Anyway, you appear to have given us a PCF format response message in your question. The message body you have given us:
Code:
msg": {"body": "0x15000000240000000300000000000000010000000100000000000000000000000c0000000400000044000000df0700005203000030000000424f42424545202020202020202020202020202020202020202020202020202020202020202020202020202020202020030000001000000047030000010000000300000010000000480300000200000017000000180000004d030000010000008d20990000000000170000001800000000000000c555020000c0f409000000001700000018000000010000001000000000c0eb1100000000170000001800000004000000c555020000300000000000001700000018000000050000000300000086070000000000000300000010000000060000003306000003000000100000000c000000701400000300000010000000070000007100000003000000100000000800000071000000"}


decodes as follows:


Code:
[  320 bytes] PCF Header (MQCFH)
Version      :3
Command      :0 (None)
Sequence No. :1
Reason       :0 (OK.)
Parm Count   :12
[  284 bytes] String (MQCFST)
Parameter Id :2015 (QMgr Name)
String Length:48
Value        :'BOBBEE                                          '
[  216 bytes] Integer (MQCFIN)
Parameter Id :839 (Monitor Class)
Value        :1 [0x'1']
[  200 bytes] Integer (MQCFIN)
Parameter Id :840 (Monitor Type)
Value        :2 [0x'2']
[  184 bytes] Integer 64 (MQCFIN64)
Parameter Id :845 (Monitor Interval)
Value        :10035341 [0x'99208D']
[  160 bytes] Integer 64 (MQCFIN64)
Parameter Id :0
Value        :167034880 [0x'9F4C000']
[  136 bytes] Integer 64 (MQCFIN64)
Parameter Id :1
Value        :300662784 [0x'11EBC000']
[  112 bytes] Integer 64 (MQCFIN64)
Parameter Id :4
Value        :12288 [0x'3000']
[   88 bytes] Integer 64 (MQCFIN64)
Parameter Id :5
Value        :1926 [0x'786']
[   64 bytes] Integer (MQCFIN)
Parameter Id :6
Value        :1587 [0x'633']
[   48 bytes] Integer (MQCFIN)
Parameter Id :12
Value        :5232 [0x'1470']
[   32 bytes] Integer (MQCFIN)
Parameter Id :7
Value        :113 [0x'71']
[   16 bytes] Integer (MQCFIN)
Parameter Id :8
Value        :113 [0x'71']


So from this I can now deduce that you are using the published stats from the queue manager - equivalent to using amqsrua.

bobbee wrote:
I tried converted to string but got an issue at byte 44.


This is not a string message - so I am not surprised that converting it to a string had issues. This is a PCF message, but you knew that because that was the first line of your question. If you have PCF processing code in your Python app, you need to apply that code to the PCF message body.

Cheers,
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
bobbee
PostPosted: Thu Jun 04, 2020 4:23 am    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
Location: Tampa

how did you decode it. You did not say. Colin P's Python script has an issue with it.
Back to top
View user's profile Send private message Send e-mail AIM Address
fjb_saper
PostPosted: Thu Jun 04, 2020 6:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

For PCF I prefer to use Java. Makes things so easy with the com.mq.header.pcf classes... using PCFMessageAgent...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
hughson
PostPosted: Thu Jun 04, 2020 3:15 pm    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
Location: Bay of Plenty, New Zealand

bobbee wrote:
how did you decode it. You did not say. Colin P's Python script has an issue with it.

I just copied it into MQEdit.
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » MQ v9.c System Stats PCF Message and Python
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.