Author |
Message
|
mmm123 |
Posted: Wed Oct 12, 2005 9:09 am Post subject: amqsget - Message contents not displayed |
|
|
 Newbie
Joined: 31 May 2005 Posts: 7 Location: Midlands, United Kingdom
|
Hi there,
I'm using amqsget to a flat file from a local queue on HP-UX.
most messages are displayed fine, however in some instances the message contents are not displayed and I get "MDE "
Please see below example:
***
Sample AMQSGET0 start
message <MDE >
message <MDE >
message <MDE >
message <MDE >
no more messages
Sample AMQSGET0 end
***
The messages are copied from a local queue on z/os and placed on the local HP-UX queue for testing purposes.
I have tried with and without "convert on get" using visual edit, I've tried creating a remote queue on the z/os pointing at the hp-ux local queue.(using conversion and without)
I always get the same problem.
Has anyone come across this before?
Thanks for you time, Mike |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 12, 2005 9:16 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
what does amqsbcg show for the queue, before you run amqsget? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
hopsala |
Posted: Wed Oct 12, 2005 9:47 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
Is there a pattern to this behavior? For example - does one set of source msgs cause MDE while another transfers without a hitch? How do you generate the source messages?
p.s this is really just a guess, since you didn't supply sufficient data, but possibly your sending appl copied the MQMD to the beginning of the data buffer itself - "MD" being the binary beginning of the header and all. Another option is that your source appl puts a null termination string ("\0") in your data, which begins with "MDE ". |
|
Back to top |
|
 |
EddieA |
Posted: Wed Oct 12, 2005 11:25 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
What version of amqsget (MQ) are you running. That looks like it's trying to display an MDE, which means that the program (amqsget) is passing in a Version 1 MQMD, but the mesages are using some V2 fields..
I'd do as Jeff suggests to see what's really there.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
Nigelg |
Posted: Wed Oct 12, 2005 11:34 pm Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
Eddia is right, the MD passed into MQGET is v1, and the msg contains non-default values for some of the v2-specific feilds of the MD. In that case, an MDE header is prepended to the msg. See the description of MQMDE in the APR for a full description of when this happens.
The most likely explanation is that the putting app on z/OS is creating msgs which use the v2 fields - these are mainly to do with msg groups and msg segmentation. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
mmm123 |
Posted: Thu Oct 13, 2005 2:17 am Post subject: |
|
|
 Newbie
Joined: 31 May 2005 Posts: 7 Location: Midlands, United Kingdom
|
I'm running MQ 5.3 CSD 5
The source of the data come from various places... WBIMB Flows, Cobol/C/Java APIs, etc. They are error report msgs.
I have noticed that it is always the same type of msg which causes this problem...
Msgs coming from a cobol API on z/os - I carried out a amqsbcg for the queue and attached the MQMD of one of these messages (see below)
As you can see the failing message is part of a group...
Ultimately, I'm just looking for a quick crude way of getting all messages into a flat file to give helpdesk staff (without mq skills) to view application errors.
Thanks, Mike
*****************************
Failing message:
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 : 1
MsgId : X'C3E2D840D8D4C1F14040404040404040BDBE6568FFCFBA07'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'QMA1 '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0000000000000000000000000000000000000000000000000000000000000000'
ApplIdentityData : ' '
** Origin Context
PutApplType : '28'
PutApplName : 'Websphere MQ Client for Java'
PutDate : '20051013' PutTime : '09143496'
ApplOriginData : ' '
GroupId : X'C3E2D840D8D4C1F115A359987EDD08A8BDBE6568FFD0A327'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '8'
OriginalLength : '-1'
**** Message ****
length - 1324 bytes
*****************************
Compared with a working message:
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 : 1 Persistence : 0
MsgId : X'C3E2D840D8D4C1F14040404040404040BDB4B482D8703425'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'QMA1 '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0000000000000000000000000000000000000000000000000000000000000000'
ApplIdentityData : ' '
** Origin Context
PutApplType : '28'
PutApplName : 'Websphere MQ Client for Java'
PutDate : '20051013' PutTime : '09483123'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 1183 bytes |
|
Back to top |
|
 |
Nigelg |
Posted: Thu Oct 13, 2005 2:45 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
The msg with the MQMDE has a GroupID set, so it is correct that it returns an MQMDE if the MD passed in is a V1. This is not a Failing msg - both msgs are being returned correctly according to the manual.
Modify amqsget to pass an MD v2 to the MQGET, and the GroupId will be returned in the MD and not in a prepended MQMDE. The displayed buffer will then be the msg data. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
|