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 » Message descriptor structure

Post new topic  Reply to topic
 Message descriptor structure « View previous topic :: View next topic » 
Author Message
abdel
PostPosted: Sun Nov 25, 2007 8:56 am    Post subject: Message descriptor structure Reply with quote

Newbie

Joined: 25 Nov 2007
Posts: 1

Hi Listers,

I really appreciate your help guys for the following problem. I have MQ client (java) which send copybook message to the Queue and another COBOL application retrieve the message and trigger transaction. But the COBOL application generate error because it found my message left appended with part of message descriptor(?). It seems that happens because the structure of my header message contains one bloc more than the structure expected by COBOL application.

Here is my MQMD:

-------------- BEGIN ---------------
AMQSBCG0 - starts here
**********************

MQOPEN - 'MYMDBQUEUE'


MQGET of message number 1
****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 273 CodedCharSetId : 819
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D5120746573746D71677220202020CF85494720000401'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : 'MYREPLYQUEUE '
ReplyToQMgr : 'qManager '
** Identity Context
UserIdentifier : ' '
AccountingToken :
X'0000000000000000000000000000000000000000000000000000000000000000'
ApplIdentityData : ' '
** Origin Context
PutApplType : '0'
PutApplName : ' '
PutDate : ' ' PutTime : ' '
ApplOriginData : ' '

GroupId : X'414D5120746573746D71677220202020CF85494720000402'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '1'
OriginalLength : '-1'

**** Message ****



And expected MD structure :

AMQSBCG0 - starts here
**********************

MQOPEN - 'MYMDBQUEUE'


MQGET of message number 1
****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 273 CodedCharSetId : 819
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D5120746573746D71677220202020CF85494720000401'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : 'MYREPLYQUEUE '
ReplyToQMgr : 'qManager '
** Identity Context
UserIdentifier : ' '
AccountingToken :
X'0000000000000000000000000000000000000000000000000000000000000000'
ApplIdentityData : ' '
** Origin Context
PutApplType : '0'
PutApplName : ' '
PutDate : ' ' PutTime : ' '
ApplOriginData : ' '

**** Message ****


--------------- END ------------------


I dont know really where is the problem. How could I change MD structure?


Any input will be greatly appreciated.
Thank you in advance.

Have a nice day,


Abdel
Back to top
View user's profile Send private message
LuisFer
PostPosted: Sun Nov 25, 2007 9:41 am    Post subject: Re: Message descriptor structure Reply with quote

Partisan

Joined: 17 Aug 2002
Posts: 302

abdel wrote:
Hi Listers,

I really appreciate your help guys for the following problem. I have MQ client (java) which send copybook message to the Queue and another COBOL application retrieve the message and trigger transaction. But the COBOL application generate error because it found my message left appended with part of message descriptor(?). It seems that happens because the structure of my header message contains one bloc more than the structure expected by COBOL application.

Here is my MQMD:

-------------- BEGIN ---------------
AMQSBCG0 - starts here
**********************

MQOPEN - 'MYMDBQUEUE'


MQGET of message number 1
****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 273 CodedCharSetId : 819
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D5120746573746D71677220202020CF85494720000401'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : 'MYREPLYQUEUE '
ReplyToQMgr : 'qManager '
** Identity Context
UserIdentifier : ' '
AccountingToken :
X'0000000000000000000000000000000000000000000000000000000000000000'
ApplIdentityData : ' '
** Origin Context
PutApplType : '0'
PutApplName : ' '
PutDate : ' ' PutTime : ' '
ApplOriginData : ' '

GroupId : X'414D5120746573746D71677220202020CF85494720000402'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '1'
OriginalLength : '-1'

**** Message ****



And expected MD structure :

AMQSBCG0 - starts here
**********************

MQOPEN - 'MYMDBQUEUE'


MQGET of message number 1
****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 273 CodedCharSetId : 819
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D5120746573746D71677220202020CF85494720000401'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : 'MYREPLYQUEUE '
ReplyToQMgr : 'qManager '
** Identity Context
UserIdentifier : ' '
AccountingToken :
X'0000000000000000000000000000000000000000000000000000000000000000'
ApplIdentityData : ' '
** Origin Context
PutApplType : '0'
PutApplName : ' '
PutDate : ' ' PutTime : ' '
ApplOriginData : ' '

**** Message ****


--------------- END ------------------


I dont know really where is the problem. How could I change MD structure?


Any input will be greatly appreciated.
Thank you in advance.

Have a nice day,


Abdel


Suppose that your Cobol APP is getting the message with MQMD VERSION 1.
Change the cobol to MD.Version 2 or Java app. to MD.Version 1
Hope this help you
Back to top
View user's profile Send private message
Nigelg
PostPosted: Mon Nov 26, 2007 12:26 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

Quote:

GroupId : X'414D5120746573746D71677220202020CF85494720000402'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '1'
OriginalLength : '-1'


This part has been added because the MQMD version 2 fields ar enon-default. The MsgFlags are 1, which means MQMF_SEGMENTATION_ALLOWED, which is why the GroupID and the rest of the fields have been completed. This flag was set when the msg was put, so check the putting app.
_________________
MQSeries.net helps those who help themselves..
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Nov 26, 2007 7:30 am    Post subject: Reply with quote

Guest




It is the responsibility of the application programmers, the one that puts the message AND the one that gets the message to coordinate the use of BOTH the MQMD and the application data.
Back to top
tleichen
PostPosted: Mon Nov 26, 2007 8:06 am    Post subject: Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

You should only use version 1 MD unless you have need of the extensions in version 2.
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

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