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 » WebSphere Message Broker (ACE) Support » Problem with recreating MQMD

Post new topic  Reply to topic
 Problem with recreating MQMD « View previous topic :: View next topic » 
Author Message
WBI_user
PostPosted: Thu Jan 17, 2008 6:37 am    Post subject: Problem with recreating MQMD Reply with quote

Partisan

Joined: 07 Aug 2001
Posts: 386

I was given an image of a message and I need to recreate the message and put it to a queue
The image of the message was from a database which as shown below


I cretaed a very simple flow
MQINPUT _ Compute - MQOUTPUT


This is the statement that I used in the compute node to first recreate the MQMD

DECLARE MSG BLOB '4d442020000000020000000000000008ffffffff0000000000000111000003334d514852463220200000000400000001414d51205141543133322020202020204745d63720082002000000000000000000000000000000000000000000000000000000002020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020205141543133322020202020202020202020202020202020202020202020202020202020202020202020202020202020206d716d202020202020202020000000000000000000000000000000000000000000000000000000000000000020202020202020202020202020202020202020202020202020202020202020200000001c576562537068657265204d5120436c69656e7420666f72204a6176613230303830313038323331363033373620202020000000000000000000000000000000000000000000000000000000010000000000000000ffffffff5246482000000002000000bc00000111000004b84d5153545220202000000000000004b8000000203c6d63643e3c4d73643e6a6d735f746578743c2f4d73643e3c2f6d63643e2020000000703c6a6d733e3c4473743e71756575653a2f2f5141543133322f4941303636462e53544f52455f4c4953545f444546494e4954494f4e2e4942532e574d423c2f4473743e3c546d733e313139393833343136333735383c2f546d733e3c446c763e323c2f446c763e3c2f6a6d733e2020203c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e3c51756572793e3c526573756c743e3c53544f5f4c4953545f434f44453e3c215b43444154415b303832355d5d3e3c2f53544f5f4c4953545f434f44453e3c53544f5f4c4953545f4e414d453e3c215b43444154415b54697265735d5d3e3c2f53544f5f4c4953545f4e414d453e3c53544f5f4c4953545f534e414d453e3c215b43444154415b5d5d3e3c2f53544f5f4c4953545f534e414d453e3c53544f5f4c4953545f545950455f434f44453e3c215b43444154415b315d5d3e3c2f53544f5f4c4953545f545950455f434f44453e3c2f526573756c743e3c2f51756572793e';

CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN('MQMD') PARSE(MSG);
:
:
some other ESQLs to process the message data

However,I got an error at the MQOUTPUT - mqrc 2026 MQRC_MD_ERROR

From debug, the MQMD fields looks like this
Encoding = 285278208
CodedCharSetId = 855834624
Format = MQHRF2
Version = 33554432
Report = 0
MsgType = 134217728
Expiry = -1
Feedback = 0
Priority = 67108864
Persistence = 16777216
MsgId = 414d51205141543133322020202020204745d63720082002

The strange values in the MQMD fileds as shown above is probably the cause of the error.

I then tried
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN('MQMD') PARSE(MSG,ENC,CCSID);
with ENC=273 and CCSID=819 which as you can see is the CCSID and Encoding value of the original message.
But same result.

Any idea what I did wrong ?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jan 17, 2008 6:54 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Did it ever occur to you that the saved BLOB / CLOB might contain the payload only and as such you're on your own with the headers (i.e. MQMD) ?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
WBI_user
PostPosted: Thu Jan 17, 2008 7:26 am    Post subject: Reply with quote

Partisan

Joined: 07 Aug 2001
Posts: 386

Sorry, I forgot to mention that I am running the flow on Windows XP WMB V6 CSD5.

Hi fjb_saper, I am on the receiving end. I can be given anything. But so far what I was given are always BLOB of the entire message including the MQMD. But the message can be of any format (CWF or JMS or XML...). This is just the beginning, our team has to provide support for any message type supported by the borker. So http or MQe is probably our next.
I have not read all the WMB books. So far all I have seen are little on warehosuing messages and almost nothing on how to reproduce saved messages. Any pointer from anyone will be greatly appreciated.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jan 17, 2008 7:35 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

If you're warehousing http messages then they won't have an MQMD either. You're going to need custom code to determine what headers (if any) the message contains.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Jan 17, 2008 7:40 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You need to know the Encoding/CCSID that the BLOB was created with, this may not be the same as the Encoding/CCSID that is in the original MQMD.

It's also not clear to me, because of my poor memory, that your DECLARE statement is properly creating the right BLOB value. Bu that might just be my poor memory.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
WBI_user
PostPosted: Thu Jan 17, 2008 8:34 am    Post subject: Reply with quote

Partisan

Joined: 07 Aug 2001
Posts: 386

The http and others stuff are for the future.

Hi jefflowrey, my clients can be V2 V5 or V6 on either Windows or UNIX plaforms. I was told that the BLOB was created with either BITSTREAM or ASBITSTREAM.

In my case, the BLOB is specified right in the ESQL and I can map the MQMD and see that Encodng and CCSID is 0000011100000333 which is 273 and 819.

I tried "Create .....PARSE(MSG,ENC,CCSID);" with 273 819 and also 546 437 with no luck. It is not likely that the BLOB was created with other combination.

Why the create and parse function gives Encoding = 285278208
CodedCharSetId = 855834624 and where are these values come from.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Jan 17, 2008 8:43 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Please pay attention.

The CCSID/Encoding in the message has nothing to do with the CCSID and Encoding of the BLOB.

More or less, from the data you have shown, I suspect that you've got the Encoding wrong.

I don't know what the encoding should be.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jan 17, 2008 10:51 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

If the blob is created with CCSID and encoding you should make sure that your DB contains as well the CCSID and encoding fields and store them with the message.
I wouldn't go as far as to hard code the values... Be aware however that hard coding these values may pose parsing problems. 1208 and 500 are not equivalent when parsing against a cobol copy book. (Special chars in UTF-8 are multibyte!)

Are you sure that you have the right BLOB?

I would have expected 2 BLOBS 1 for the MQMD and One for the Input/OutputBody (Payload)

If your level for ASBITSTREAM truly was InputRoot you should delete the properties before attempting what you do... The start of your input might just be the Properties...


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem with recreating 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.