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 » Changing contents of BLOB Msg

Post new topic  Reply to topic
 Changing contents of BLOB Msg « View previous topic :: View next topic » 
Author Message
Armin
PostPosted: Wed Jul 25, 2001 8:30 am    Post subject: Reply with quote

Novice

Joined: 24 Jul 2001
Posts: 15
Location: Germany

I have to convert pipe-delimited input messages into MRM-Format (e.g. data1|data2|. My idea was to receive msgs as BLOB, change all occurences of '|' to X'00' and reset the content descriptor to my MRM-Format to further process the message. I managed to access the incoming blob in a Trace Node(via Root.BLOB.BLOB), but how can I access the BLOB contents in the compute node and alter it? InputRoot.BLOB.BLOB and OutputRoot.BLOB.BLOB are not working. Any ideas? Or is there a better way? Maybe not using BLOB, but instead using MRM with only one very long field as input and then after conversion of | resetting the message descriptor? Any help apreciated.

Armin
Back to top
View user's profile Send private message
kolban
PostPosted: Wed Jul 25, 2001 8:36 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

I don't think working with BLOB data is going to be the right answer. I would personally use the NEON formatter to recognize incoming fields delimited by '|'. Once parsed, you can then move the recognized fields into an MRM message tree and you should be done.
Back to top
View user's profile Send private message
Armin
PostPosted: Wed Jul 25, 2001 9:05 am    Post subject: Reply with quote

Novice

Joined: 24 Jul 2001
Posts: 15
Location: Germany

Our goal was to avoid NEON if any possible, because we were not very happy with NEON Integrator 1.1 . We tried to do it the "Integrator 2 Way" . Besides your tip to use NEON, just for curiousity, is there a way to access blobs in compute nodes?

Armin
Back to top
View user's profile Send private message
kolban
PostPosted: Wed Jul 25, 2001 9:42 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

The BLOB parsed data can be accessed in a compute node but its not pretty. A BLOB is a bytearray of data ... untyped. If cast to a string, it takes on the representation of a hex string ... eg. if the message on the queue contains "ABC|123" and this is read as a blob, 7 bytes of data (as expected) are returned. If cast to string, its value would be:

'4142437C313233'

This means that you can't look for '|' in the string since it isn't there!!! Its character representation is '7C'. All in all, BLOB sub-parsing is pretty limited. Strongly suggest the NEON parser or a custom parser that you could write in C or C++.

Remember, the NEON parser is fully supported within the MQSI V2 environment. Define the Input Format using the NEON formatter GUI and then define the MQInput node to use the NEON parsing ...

[ This Message was edited by: kolban on 2001-07-25 10:44 ]
Back to top
View user's profile Send private message
EddieA
PostPosted: Tue Aug 07, 2001 9:10 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

I would agree with Neil that you really should use the NEON parser for this.

But, if you really, really, really, have to do this as a BLOB, then I can post some code that will do this. (It was originally written to add hex values to an MRM message).

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
Armin
PostPosted: Thu Aug 09, 2001 8:34 am    Post subject: Reply with quote

Novice

Joined: 24 Jul 2001
Posts: 15
Location: Germany

I´ve already done it the "BLOB-way". It works like a charm. The real problem was, that everytime I enteres a statement like

SET OutputRoot.BLOB.BLOB = ......

in a compute node, the compute note synax checker showed an syntax error. I spend a lot of time figuring out, that my code in fact is ok and runs pretty good in the broker. I just ignored and deployed it. Not very nice but it works.

Maybe its a problem of MQSI version 2.0.1
Thanks for all your help offers

Armin
Back to top
View user's profile Send private message
kolban
PostPosted: Thu Aug 09, 2001 8:56 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Aha!!! Been there, done that.

BLOB (the word) is an ESQL keyword. Like other keywords, you can use those in tree names but you have to escape their special meaning with the " character.

Instead of entering:

SET OutputRoot.BLOB.BLOB = ...

which will raise a syntax error, use:

SET OutputRoot."BLOB"."BLOB" = ...

All will now be well. I always "escape" my tree component names as a matter of habit.
Back to top
View user's profile Send private message
Armin
PostPosted: Thu Aug 09, 2001 9:59 am    Post subject: Reply with quote

Novice

Joined: 24 Jul 2001
Posts: 15
Location: Germany

>I always "escape" my tree component names as a matter of habit.

Good idea. I will adopt it. And sorry for blaming the syntax checker

Armin
Back to top
View user's profile Send private message
Tibor
PostPosted: Fri Aug 10, 2001 12:21 am    Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

You can handle a BLOB message with substring function. It isn't smart but works. And, of course, lightning fast.
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 » Changing contents of BLOB Msg
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.