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 » amqsget - Message contents not displayed

Post new topic  Reply to topic
 amqsget - Message contents not displayed « View previous topic :: View next topic » 
Author Message
mmm123
PostPosted: Wed Oct 12, 2005 9:09 am    Post subject: amqsget - Message contents not displayed Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Wed Oct 12, 2005 9:16 am    Post subject: Reply with quote

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
View user's profile Send private message
hopsala
PostPosted: Wed Oct 12, 2005 9:47 am    Post subject: Reply with quote

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
View user's profile Send private message
EddieA
PostPosted: Wed Oct 12, 2005 11:25 am    Post subject: Reply with quote

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
View user's profile Send private message
Nigelg
PostPosted: Wed Oct 12, 2005 11:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
mmm123
PostPosted: Thu Oct 13, 2005 2:17 am    Post subject: Reply with quote

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
View user's profile Send private message
Nigelg
PostPosted: Thu Oct 13, 2005 2:45 am    Post subject: Reply with quote

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
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 » amqsget - Message contents not displayed
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.