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 » MRM to BLOB without using the Message set

Post new topic  Reply to topic
 MRM to BLOB without using the Message set « View previous topic :: View next topic » 
Author Message
WBI_developer
PostPosted: Tue Nov 08, 2005 1:33 pm    Post subject: MRM to BLOB without using the Message set Reply with quote

Apprentice

Joined: 02 Jun 2004
Posts: 25

Hello,
I have a requirement wherein I have to create a BLOB of the input MRM. I could use ASBITSTREAM but it requires the usage of message set. I do not want to do it like that as I want to recreate the original MRM message as BLOB no matter what ever type of message. Please let me know how I could do that.

Thanks,
Maguire
Back to top
View user's profile Send private message
recallsunny
PostPosted: Tue Nov 08, 2005 2:52 pm    Post subject: Reply with quote

Disciple

Joined: 15 Jun 2005
Posts: 163
Location: Massachusetts

Do you explore the use of ResetContentDescriptor...??
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Nov 08, 2005 3:16 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

ASBITSTREAM does not require the use of a message set.

And even if it did, InputRoot.Properties contains all of the information you need to identify the message.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
WBI_developer
PostPosted: Wed Nov 09, 2005 7:56 am    Post subject: Reply with quote

Apprentice

Joined: 02 Jun 2004
Posts: 25

Hi,
Thanks a lot for your responses. I thought of using an RCD node but I didn't want to use an extra node also my requirement needed me to create blob with in compute node. As for ASBITSTREAM it wasn't accepting a direct conversion to BLOB. It is giving me a message that it cannot convert to bitstream unless the wireformat is mentioned. I could use BITSTREAM which is working fine but it seems to be giving different results when the original message has MQRFH2 header and when it does not. Please could somebody explain

Thanks,
Maguire
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Nov 09, 2005 8:05 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Instead of re-creating the input message, you could
- parse it as a BLOB
- save a copy of InputRoot.BLOB.BLOB (in the environment)
- use the RCD node (or CREATE...PARSE, if performance matters a lot) to parse the message against the message set.
- Refer to the BLOB in the environment any time you need it.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Nov 09, 2005 8:29 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

BITSTREAM is deprecated. Don't use it.

Show the code that throws the error when trying to use ASBITSTREAM.

And I repeat, InputRoot.Properties will contain any information you need to give to ASBITSTREAM, which I think you don't need.

And also, ASBITSTREAM does not convert to BLOB. It returns a bitstream which IS a blob.

I suspect you're doing the wrong thing.

So show your code!
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
WBI_developer
PostPosted: Wed Nov 09, 2005 10:53 am    Post subject: Reply with quote

Apprentice

Joined: 02 Jun 2004
Posts: 25

Thank you. Here are the different ASBITSTREAM commands I used to make it work. none of them worked.

ASBITSTREAM(InputBody, InputRoot.MQMD.Encoding,InputRoot.MQMD.CodedCharSetId)


ASBITSTREAM(InputBody)

ASBITSTREAM(InputRoot.MRM CCSID InputRoot.MQMD.CodedCharSetId Encoding InputRoot.MQMD.Encoding)

for all these I get the same error :

[b]Invalid Wire Format Identifier ''. [/b]

Thanks in advance
Back to top
View user's profile Send private message
JT
PostPosted: Wed Nov 09, 2005 12:47 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

As Jeff stated, expand the ASBITSTREAM statement using the InputRoot.Properties to anonymously identify the messageset of the input message:
  • InputRoot.Properties.MessageSet
  • InputRoot.Properties.MessageType
  • InputRoot.Properties.MessageFormat
Back to top
View user's profile Send private message
WBI_developer
PostPosted: Wed Nov 09, 2005 1:17 pm    Post subject: Reply with quote

Apprentice

Joined: 02 Jun 2004
Posts: 25

Hi,
I think I did not explain my requirement clearly. I am trying to save my original message as BLOB when an error occurs. In the error handler I am trying to copy the original message as BLOB for which I am using ASBITSTREAM.

However, when I get parser exception and I try to create the BLOB with message set details it is again throwing exception because the message itself is not as per the message set. That is why I want the original message to be converted to BLOB without using the message set values. Can this be done at all?

Thanks,
Krishna
Back to top
View user's profile Send private message
wschutz
PostPosted: Wed Nov 09, 2005 4:07 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

If you put a trace node before the compute node and dump the ${Root}, what do you see?
(ie, cut and past the output here....)
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
kimbert
PostPosted: Thu Nov 10, 2005 1:34 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Why does this not work:
Quote:
Instead of re-creating the input message, you could
- parse it as a BLOB
- save a copy of InputRoot.BLOB.BLOB (in the environment)
- use the RCD node (or CREATE...PARSE, if performance matters a lot) to parse the message against the message set.
- Refer to the BLOB in the environment any time you need it.
Back to top
View user's profile Send private message
jhosie
PostPosted: Thu Nov 10, 2005 3:25 am    Post subject: Reply with quote

Apprentice

Joined: 12 May 2005
Posts: 28

You sould use the EmbeddedBitStream option

Code:

        SET OutputRoot.BLOB.BLOB=ASBITSTREAM(InputBody OPTIONS EmbeddedBitStream);


This code should give you the same bitstream that would be written to the queue by a MQOutputNode. So, assuming that you have not changed the message tree, that will probably be the original bitstream. (I'm not sure if that statement is always true e.g. if you are using validation or you have optional elements).

So you don't need to code the Set, Type, Format Encoding or CCSID ( or even Domain).
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Nov 10, 2005 3:30 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I'm doubtful about trying to re-create the input message in an error flow. If I was trying to diagnose an error in the flow, I would want to be sure that I was looking at the real input message. Bear in mind that some errors in your flow might be the result of a parsing error, in which case the message tree might be badly-structured, and the result of ASBITSTREAM could easily differ from the real input message.
Back to top
View user's profile Send private message
WBI_developer
PostPosted: Thu Nov 10, 2005 6:32 am    Post subject: Reply with quote

Apprentice

Joined: 02 Jun 2004
Posts: 25

Thanks a lot for all your responses. Kimbert, I liked your solution but I did not want to lose all the properties data which has the original message data. Also I didn't want to use another node as I am already making it pretty complex. After looking at all the solutions I feel that the best solution would be storing all the required values in Environment variables and use RCD node to convert to BLOB.

Thanks,
Maguire
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 » WebSphere Message Broker (ACE) Support » MRM to BLOB without using the Message set
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.