Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MQMD Options

Status
Not open for further replies.

kiaras

Programmer
Feb 20, 2004
6
IE
I am outputting messages but nheed tp change the group id and must make the messages allow segmentation. I must also determine if the message is the first / middle / last in the group and change the output accordingly.I have found the following code
DECLARE group_id CHARACTER;
SET group_id = THE(SELECT ITEM T.VENDOR_ID
FROM Database.GROUP_ID AS T) ;
SET group_id = '00000000000000000000000000000'||group_id ;

UPDATE Database.GROUP_ID AS T
SET "GROUP_ID.VENDOR_ID" = T.VENDOR_ID + 4;
Set OutputRoot.MQMD.GroupId = CAST(group_id AS BLOB) ;
Set OutputRoot.MQMD.MsgFlags = 1;
will change my group id and msgs flags when browsing the queue through the debugger but on the output q, the group id stays the smes and i cant find any options for the flags to be set. I have also found the following options in documentation MQMF_MSG_IN_GROUP and other similar options that must be set within MQMD.MsgFlags, but I do not know where to set these. Has anyone any experience of this sort? Any comments / help appreciated. Many Thanks Kiara
 
You should review the Manuals which have all the details and answers you are looking for. But here's a brief synopsis though.

Segmentation and Grouping are 2 different issues altogether. Since you say you are trying to group messages up. What you need to do is to add MQMF_MSG_IN_GROUP, which you found in manuals to md.MsgFlags. Make sure when you are putting messages that all fall within the same group, to NOT change the md. Once you have put all messages in that group and are at the last message, just modify the md.msgflags to MQMF_LAST_MSG_IN_GROUP. This way you tell MQ that you are done putting all messages in a group.

When you are retriving messages(get or browse) you just use MQMO_MATCH_GROUP_ID in your gmo.options. And of course either sepecify the groupid there or just use the one that you get from the first get.



Cheers
KK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top