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 » how to remove the first few bytes from BLOB msg

Post new topic  Reply to topic
 how to remove the first few bytes from BLOB msg « View previous topic :: View next topic » 
Author Message
mqlover
PostPosted: Tue Oct 30, 2012 8:25 pm    Post subject: how to remove the first few bytes from BLOB msg Reply with quote

Disciple

Joined: 25 Jul 2010
Posts: 176

Hi,

I have a message coming in from some adapter with a length of say 100 bytes. I need to delete the first 30 bytes and also read the fields present in the first 30 bytes and map it to a fields present at the other end.
I tried this way.
SUBSTRING(InputBody.BLOB.BLOB from 1 for 10).
I want to read the first 10 bytes.

But this is not working.

Could any one please help on this.

Thanks
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Oct 30, 2012 10:45 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Perhaps you should look at the differences between
Code:

  InputRoot.

and
Code:

  InputBody


In future, you might like to also think about adding a bit more detail to the statement
Quote:

But this is not working.

How did you know this?
What did you observe to enable you to come up with this statement?
What other things have you tried in order to solve this?
Did you take a user trace and see what it says?
This can be very enlightening.

The more detail you supply, the more we can help. A lack of detail may result in you being given suggestions that you have already tried.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mqlover
PostPosted: Wed Oct 31, 2012 12:51 am    Post subject: how to remove the first few bytes from BLOB msg Reply with quote

Disciple

Joined: 25 Jul 2010
Posts: 176

Thanks for your suggestion. Actually I used InputRoot instead of InputBody and its really working.

Thanks.

Adding on to it. How do I map the bytes in the BLOB msg to a XML structure.
Ex :
SET OutputRoot.XMLNSC.name = SUBSTRING(InputRoot.BLOB.BLOB from 1 for 5);

I am trying the above and in user trace its just coming a BLOB msg itself i.e some numbers. How do I change it to a readable format?
Back to top
View user's profile Send private message
kevinobyrne
PostPosted: Wed Oct 31, 2012 1:17 am    Post subject: Reply with quote

Voyager

Joined: 17 Jul 2007
Posts: 83
Location: Ireland

CAST(InputRoot.BLOB.BLOB AS CHAR CCSID InputRoot.Properties.CodedCharSetId);
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Oct 31, 2012 7:21 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You are converting a non-XML input message to an XML output message. You should be using the DFDL ( if on v8 ) or MRM ( if on v7 ) parser to parse your input message. Trying to do the parsing using ESQL is
a) doing it the hard way and
b) creating a problem for future maintainers of your flow.
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 » how to remove the first few bytes from 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.