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 » Parsing Hex messages using TDS

Post new topic  Reply to topic
 Parsing Hex messages using TDS « View previous topic :: View next topic » 
Author Message
dipscool
PostPosted: Mon Aug 14, 2006 2:59 am    Post subject: Parsing Hex messages using TDS Reply with quote

Novice

Joined: 14 Aug 2006
Posts: 13

we are planning to use Tagged/Delimited format for a MRM defnition. The message from the source system is coming in HEX format. Is there any way that I can design a TDS to parse those messages

Input Message is

X'4e616d653b5b5469746c653a4d722a46697273744e616d653a467265642a4c6173744e616d653a426c6f6767735d26416464726573733b5b486f7573654e6f3a31322a5374726565743a57696c6c6f77204176656e75652a546f776e3a53616c6973627572795d'

If not that what would be the best possibleway to parse this message.Our requirement is to check the content of the message and route it to different destination.

Any help is appreciated...
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Aug 14, 2006 3:18 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Don't be lazy! Your problem description is extremely poor. Post again, this time providing the following:
- which version and CSD level of the broker you are using
- a human-readable version of your message
- what kind of checks you want to carry out on the message before you forward it
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 14, 2006 3:18 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Are you sure that's the input message?

Or is it only showing up that way because you're parsing it as BLOB and then trying to view it as string data?

Maybe you should ask the people who send the message what it looks like.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dipscool
PostPosted: Mon Aug 14, 2006 4:46 am    Post subject: Reply with quote

Novice

Joined: 14 Aug 2006
Posts: 13

Sorry about inconvenience caused. Let me explain it clearly.

1. Version of Message Broker - 5.0 with fixpack 7

2.Human readable version - I do not have the readable version of the message exaclty but i do have the structure of the message saying what
is the name of the tag and delimiter based on which I can design a TDS format.

3.Checks that need to be performed - value of three to four different fields based on which the routing has to happen.

4.Regarding the human readable fromat I do not have that now but i do have the message structure defined in a word document as explained above.

I hope i answer your questions correctly this time.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 14, 2006 4:48 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Does the structure of the message match what can be parsed with TDS?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Aug 14, 2006 4:56 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I do not have the readable version of the message exaclty
I do - it's straightforward ASCII text:
Code:
Name;[Title:Mr*FirstName:Fred*LastName:Bloggs]&Address;[HouseNo:12*Street:Willow Avenue*Town:Salisbury]

This message format can easily be parsed by the TDS parser using the 'Tagged Delimited' Data Element Separation style. You might need to convert it from hex to text first, depending on the answer to Jeff's question.
Back to top
View user's profile Send private message
dipscool
PostPosted: Tue Aug 15, 2006 8:53 pm    Post subject: Reply with quote

Novice

Joined: 14 Aug 2006
Posts: 13

Thanks. I am new to message broker. Wanted to know is there anyway that I can cpvert the input message which is in Hex format to TEXT string.

I tried the same but couold not succeed.I designed as message flow with MQInput -> Cmopute->MQOutput

I have set the Domain of MQInput as BLOB and in the compute node i tried various options of casting but no luck.

Appreciate if you can tell me what is the best way to convert the ex message to Text format and then parse it using TDS parse.

Appreciate your help.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Aug 16, 2006 12:53 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Something like this ( code not tested )
Code:

-- Set the options to be used by ASBITSTREAM and CREATE ... PARSE
-- to be FolderBitStream
DECLARE parseOptions INTEGER RootBitStream;
-- Parse the BLOB
CREATE LASTCHILD OF OutputRoot DOMAIN 'MRM' PARSE( InputBody.BLOB
ENCODING InputProperties.Encoding
CCSID InputProperties.CodedCharSetId
SET 'JMKCC30002001'
TYPE 'message'
FORMAT 'XML'
OPTIONS parseOptions);


If you search for 'CREATE LASTCHILD Domain MRM PARSE' in this forum you will find a few more useful posts on this subject.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Aug 16, 2006 1:58 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Or just don't set the Domain on the MQInput to BLOB - but set it to match your MRM definitions....


You're asking fairly basic questions about WMB. You should really spend more time reading the documentation and get some training.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jbanoop
PostPosted: Wed Aug 16, 2006 4:28 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

Kimbert,
on an off topic note .. what tool did you use to get the ascii for the blob value that dipscool posted ?
Regards,
Anoop
Back to top
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Wed Aug 16, 2006 4:30 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

jbanoop wrote:
Kimbert,
on an off topic note .. what tool did you use to get the ascii for the blob value that dipscool posted ?
Regards,
Anoop


I used to have a perl one-liner that would do this, using unpack.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ydsk
PostPosted: Wed Aug 16, 2006 1:10 pm    Post subject: Reply with quote

Chevalier

Joined: 23 May 2005
Posts: 410

Here is one tool.....download it:

http://bluefive.pair.com/hexwrite.htm

I never used it though.

Search for 'Hex to ASCII' and you might hit some more tools. I had a different tool but don't remember its name.

Thanks.
ydsk.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Aug 17, 2006 12:33 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Code:
perl -e "print pack('H*','6162');"

produces the output string 'ab'
I'm using ActiveState Perl, but this should work with any version of Perl.
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 » Parsing Hex messages using TDS
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.