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 » Variable length Blob to Mrm?

Post new topic  Reply to topic
 Variable length Blob to Mrm? « View previous topic :: View next topic » 
Author Message
Peter
PostPosted: Fri Aug 08, 2003 12:24 am    Post subject: Variable length Blob to Mrm? Reply with quote

Newbie

Joined: 08 Aug 2003
Posts: 1

Hi,

I'm trying to take variable length input messages of structure:
Id (4 bytes)
Type (16 bytes)
Text (0-4096bytes)
And split them into two messages - one containing the Id and Type (aswell as some static data) and one containing the variable length text field.
I am trying to use a null terminated mrm message type to deal with the variable length but am not being allowed to check this in (mqsi v2.0.2) with reason being: invalid padding character. Is this a bug with the control centre?

As an alternative method I have tried taking the message as a blob (Input node domain) and doing substring operations on the message to extract the id, type and text. Then passing through a ResetContentDescriptor to map to a fixed length mrm. However I am getting hex strings in my output message despite casting the results to Char.

Am I on the right track with this? any help much appreciated.

Pete
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Aug 08, 2003 5:28 am    Post subject: Re: Variable length Blob to Mrm? Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Peter wrote:
I am getting hex strings in my output message despite casting the results to Char.


I don't know if this works on 2.02, but in 2.1 the solution for this problem is to include a CCSID specification to the cast function.
Code:
cast(InputRoot.BLOB.BLOB as character CCSID InputRoot.Properties.CodedCharSetId)
Back to top
View user's profile Send private message
jfluitsm
PostPosted: Sun Aug 10, 2003 7:22 am    Post subject: Reply with quote

Disciple

Joined: 24 Feb 2002
Posts: 160
Location: The Netherlands

You can define your message as a fixed message instead of using null-terminated. As the text field is the last field in your message you can define it's lenght as end-of-message
_________________
Jan Fluitsma

IBM Certified Solution Designer WebSphere MQ V6
IBM Certified Solution Developer WebSphere Message Broker V6
Back to top
View user's profile Send private message Send e-mail
mqhelp
PostPosted: Mon Aug 11, 2003 7:11 am    Post subject: Reply with quote

Newbie

Joined: 20 Jun 2003
Posts: 6

Hi,

It did well for me on ver2.1 using null terminated String for variable length record and reparsing using ResetContentDescriptor. Please make sure you have checked out Reset Message Domain, Reset Message Set, Reset Message Set and Reset Message Format properties for ResetContentDescriptor node to have automatically the domain set to MRM and avoid hex values as in BLOB domain.

Regards,
Srini
Back to top
View user's profile Send private message
Craig B
PostPosted: Wed Aug 13, 2003 7:31 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

If you are using MQSI V2.02, then you will not be able to use the CAST with CCSID parameter to convert your BLOB into its true character form. This functionality was only introduced into V2.1.

In V2.02 you said that the Control Centre reported an Invalid Padding character when you attempted to use a NULL terminated String. What was the padding character set to? If the Padding character was NUL and you selected a NULL terminated string then this would be a conflict since the addition of padding characters would null terminate the string in the wrong place.

If you are using V2.1 then the best way to handle this would be to set the Last Variable length element to have Length Units = End of Bitstream. This means that this field will consume all the bytes up that are left in the input message, and thus you get your variable length field. This way you will not need to worry about BLOB processing, CASTing and RCD nodes. You would just be able to specify the MRM messageSet details in the Input node and deal with an MRM message tree.
_________________
Regards
Craig
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 » Variable length Blob to Mrm?
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.