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 Discussion » MQMD

Post new topic  Reply to topic Goto page 1, 2  Next
 MQMD « View previous topic :: View next topic » 
Author Message
rammer
PostPosted: Wed Apr 21, 2004 1:49 am    Post subject: MQMD Reply with quote

Partisan

Joined: 02 May 2002
Posts: 359
Location: England

Hi

I have a general question regarding the size of the MQMD. Does anybody know if there is a default size of MQMD or does it depend on what context is added.

I have tried searching for the answer within this forum and through the MQ Application Programming Reference with out any luck.

Thank you in advance
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Wed Apr 21, 2004 3:04 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

it's fixed length, if my memory serves me correctly 758 bytes in total.
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
rammer
PostPosted: Tue Apr 27, 2004 12:49 am    Post subject: Reply with quote

Partisan

Joined: 02 May 2002
Posts: 359
Location: England

Thanks for the prmpt reply.
Back to top
View user's profile Send private message
kman
PostPosted: Tue Apr 27, 2004 2:29 am    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2003
Posts: 309
Location: Kuala Lumpur, Malaysia

mmm is that really? I thought 4k is reserved for MQMD. Or was it 4k reserved for MQ headers.. so it should be MQMD + ?
Back to top
View user's profile Send private message Yahoo Messenger
Michael Dag
PostPosted: Tue Apr 27, 2004 2:53 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

as far as I know the only part that is fixed and is reserved is the MQMD itself, any other header is 'technically' part of the 'payload' (and thus not reserved).
Whether 758 bytes is still valid or wether my memory is scrambled I wouldn't know
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mqonnet
PostPosted: Tue Apr 27, 2004 4:45 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

You could add up all the field's sizes in the MQMD structure and you would get the length. Remember that if you dont include V2 fields, it would be different.

Just out curiosity though, why do you need it. I havent come accross a situation where i needed this info, since its an MQ internal structure.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rammer
PostPosted: Tue Apr 27, 2004 5:43 am    Post subject: Reply with quote

Partisan

Joined: 02 May 2002
Posts: 359
Location: England

To be honest I am not sure why it is needed but one of our developers was after the figure.
Back to top
View user's profile Send private message
mqonnet
PostPosted: Tue Apr 27, 2004 5:46 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

The only purpose i could think of is memory management. But since this is almost a neglegible amuont, its really not worth the time and effort digging into it. :)

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Michael Dag
PostPosted: Tue Apr 27, 2004 6:09 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

the reason I know about it is once we got bitten by it where an interface
between individual checkout machines in a supermarket was developed and
they were sending line item per line item in an MQ message,
the header / payload overhead turned out to be 5000% ... (sending 15 bytes with a 758 bytes header...)

clearly in some cases it is important information for your design ...
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
PeterPotkay
PostPosted: Tue Apr 27, 2004 10:14 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

A Version1 MQMD is 364 bytes. I had to define a hold field in WorkIng Storage in a COBOL copybook to save off the original MQMD, and that was the length it turned out to be.

A Version2 MQMD would be a little longer.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Tue Apr 27, 2004 12:24 pm    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

Can anyone verify the length of a Version2 MQMD,
otherwise I need to stop by the shop tomorrow first thing for some new memory blocks ...
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
PeterPotkay
PostPosted: Tue Apr 27, 2004 12:30 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Michael, looking at the COBOL declaration of the Version 2 fields, I see an extra 40 bytes:

GroupID = 24 bytes
MsgSeqNumber = 4 bytes
OffSet = 4 bytes
MsgFlags = 4 bytes
OriginalLength = 4 bytes.

Maybe you were also factoring in the Transmit Queue Header, as well as TCP/IP "stuff" associatted with each MQ message?
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Tue Apr 27, 2004 12:36 pm    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

758 - 364 - 40 = 354... could this indeed be the transmissionQ header?
the data was sent to another Qmgr at the time...
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
kirani
PostPosted: Tue Apr 27, 2004 10:28 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Now I am getting confused! I believe the MQMD V2 size is 364 bytes.

Code:


 struct tagMQMD {
   MQCHAR4   StrucId;           /* Structure identifier */
   MQLONG    Version;           /* Structure version number */
   MQLONG    Report;            /* Options for report messages */
   MQLONG    MsgType;           /* Message type */
   MQLONG    Expiry;            /* Message lifetime */
   MQLONG    Feedback;          /* Feedback or reason code */
   MQLONG    Encoding;          /* Numeric encoding of message data */
   MQLONG    CodedCharSetId;    /* Character set identifier of message
                                   data */
   MQCHAR8   Format;            /* Format name of message data */
   MQLONG    Priority;          /* Message priority */
   MQLONG    Persistence;       /* Message persistence */
   MQBYTE24  MsgId;             /* Message identifier */
   MQBYTE24  CorrelId;          /* Correlation identifier */
   MQLONG    BackoutCount;      /* Backout counter */
   MQCHAR48  ReplyToQ;          /* Name of reply queue */
   MQCHAR48  ReplyToQMgr;       /* Name of reply queue manager */
   MQCHAR12  UserIdentifier;    /* User identifier */
   MQBYTE32  AccountingToken;   /* Accounting token */
   MQCHAR32  ApplIdentityData;  /* Application data relating to
                                   identity */
   MQLONG    PutApplType;       /* Type of application that put the
                                   message */
   MQCHAR28  PutApplName;       /* Name of application that put the
                                   message */
   MQCHAR8   PutDate;           /* Date when message was put */
   MQCHAR8   PutTime;           /* Time when message was put */
   MQCHAR4   ApplOriginData;    /* Application data relating to
                                   origin */
   MQBYTE24  GroupId;           /* Group identifier */
   MQLONG    MsgSeqNumber;      /* Sequence number of logical message
                                   within group */
   MQLONG    Offset;            /* Offset of data in physical message
                                   from start of logical message */
   MQLONG    MsgFlags;          /* Message flags */
   MQLONG    OriginalLength;    /* Length of original message */
 };

_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Michael Dag
PostPosted: Tue Apr 27, 2004 11:25 pm    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

well worth finding out what's the truth! (beats answering 2035 error questions )

So MQMD V2 = 364

TransmissinQ Header adds:
Code:
   MQCHAR4   StrucId;         /* Structure identifier */
   MQLONG    Version;         /* Structure version number */
   MQCHAR48  RemoteQName;     /* Name of destination queue */
   MQCHAR48  RemoteQMgrName;  /* Name of destination queue manager */


4 + ??? + 48 + 48 = 100 + ???

how long is an MQLONG? (I am not a programmer obviously...)
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General Discussion » MQMD
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.