Is it possible to get generated new MsgId when put message with MA01 (q utility)?
I would like to incorporate MA01 in automated testing:
1. Put message to inbound queue Q1;
2. Check if message arrives to target queue Q2 (after processing in flow);
This topic has been locked.
4 replies Latest Post - 2012-12-14T12:58:06Z by SystemAdmin
Pinned topic ma01: how to get generated MsgId?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-12-14T12:58:06Z at 2012-12-14T12:58:06Z by SystemAdmin
Re: ma01: how to get generated MsgId?2012-12-03T11:25:20Z in response to SystemAdminIf you don't provide q with a specific message ID to use, then the queue manager will generate unique message IDs for you. I suspect this therefore means you are already getting new MsgIDs generated for you.
Perhaps I have misunderstood your question? Please ask again with more detail if this is the case.
Re: ma01: how to get generated MsgId?2012-12-04T22:55:54Z in response to SystemAdminHi Morag,
thanks for reply.
What I'd like to be able to do is:
1. PUT message to queue Q1 using q program (not providing MsgId);
2. Get MsgId generated by qmgr;
3. GET message from queue Q2 by MsgId;
I know that this could be easily done using MQ Java libraries or generating (hopefully) unique MsgId, but was wondering, maybe q program has some "verbose" mode or other options to print generated MsgId.
Re: ma01: how to get generated MsgId?2012-12-05T10:40:25Z in response to SystemAdminTo display the MessageId using the q program do this:-
q -m qmgr-name -i q-name -dd
-dd displays the MQMD after the MQGET, and thus shows you the Message Id. Here is an example:-
MQMD after MQGET Message Descriptor (MQMD) Report :00000000 Message Type :8 (Datagram) Format : 'MQSTR ' Priority :0 Persistence :0 (Not Persistent) Message Id :414D51204E54314D4148202020202020FC47B75020003502 'AMQ NT1MAH .G.P .5.' ReplyToQ : ' ' ReplyToQMgr : 'NT1MAH ' ============================================================================ Hello World
Hope that helps