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 read the SWIFT message in ESQL & convert hex to A

Post new topic  Reply to topic
 how to read the SWIFT message in ESQL & convert hex to A « View previous topic :: View next topic » 
Author Message
SarithaRao
PostPosted: Mon May 15, 2006 11:19 am    Post subject: how to read the SWIFT message in ESQL & convert hex to A Reply with quote

Newbie

Joined: 15 May 2006
Posts: 7

I have a SWIFT message coming in as BLOB. I need to read some values from SWIFT header and populate in the RFH header.

For ex: I need to find the '{2:O' and get the 540 from the below :
{1:F01XXXXXXXXXXXX0861222742}{2:O5401233060207XXXXXX33EXXX14952628790602070933N}{3:{108:1139333602362t90}}{4:

Currently I am using POSITION function with the value "7b323a4f"(blob value of "{2:O") to get the index of "{2:O", but i am not directly able use string '{2:O' in the position function, when i use i am not getting the index of that value:

POSITION('7b323a4f' in message)

Is there any way i can pass directly the string what i am looking for?

Secondly, after i use SUBSTRING to get the 540(BLOB variable)
and converted it to CHAR and i got the value " X'353430'" in it(hex value)...

I am populating this character variable in the RFH header, and it is looking like the below:
<msgType>X&apos;353430&apos;</msgType>

How to get the ASCII value(which is 540) from a character variable which contains the hex value in ESQL...

Is there any conversion functions available, if not how to do this?

Thanks!
Back to top
View user's profile Send private message
dsriksha
PostPosted: Mon May 15, 2006 11:53 am    Post subject: Re: how to read the SWIFT message in ESQL & convert hex Reply with quote

Voyager

Joined: 27 Feb 2005
Posts: 95

Search this forum for CAST and POSITION
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Tue May 16, 2006 12:58 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Two questions:
- Why not use the TDS parser to extract the message key from the header?
- Are you populating the RFH header so that you can parse against another message definition later on? If so, there's a much simpler way to do this.
Back to top
View user's profile Send private message
SarithaRao
PostPosted: Tue May 16, 2006 8:47 am    Post subject: Reply with quote

Newbie

Joined: 15 May 2006
Posts: 7

Kimbert,

Thanks for your reply!

- what is TDS parser? I am not using any message sets, is TDS parser relates to message sets?

- I am populating the RFH header to use that as subscription later...
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue May 16, 2006 9:21 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

So the whole point of this exercise is to touch as little data as possible, and then publish the message under the SWIFT message key?

You should reexamine dsrikasa's posting.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
SarithaRao
PostPosted: Tue May 16, 2006 9:41 am    Post subject: Reply with quote

Newbie

Joined: 15 May 2006
Posts: 7

The whole point is i need to read the SWIFT message and get some values and populate those in the RFH header.

Please let me know how to do this?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue May 16, 2006 11:56 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

SarithaRao wrote:
The whole point is i need to read the SWIFT message and get some values and populate those in the RFH header.

Please let me know how to do this?


You can either model the message using the MRM, and extract the values by accessing them in the resulting message tree, or you can read up on CAST and POSITION, as dsriksha suggested, and see how to combine them to do what you want to do.

If you model the messages, then you can reuse the message set for different flows, like perhaps the SUBSCRIBER to these publications.
_________________
I am *not* the model of the modern major general.


Last edited by jefflowrey on Tue May 16, 2006 1:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
SarithaRao
PostPosted: Tue May 16, 2006 12:48 pm    Post subject: Reply with quote

Newbie

Joined: 15 May 2006
Posts: 7

I am currently using POSITION and CAST functions, but i am getting the hex value in it and i don't know how to CAST it to the ASCII value?

For ex: After i use POSITION and CAST, i have a CHAR variable with value "353430" and i need to convert this to ASCII value (540), could you please help? I didnt find any built in conversion functions...are there any?

Thank you!
Back to top
View user's profile Send private message
SarithaRao
PostPosted: Tue May 16, 2006 12:50 pm    Post subject: Reply with quote

Newbie

Joined: 15 May 2006
Posts: 7

And how to do model the message using MRM? Could you please give me any useful links which includes the step by step process and examples...

Thanks!
Back to top
View user's profile Send private message
TheBigEasy
PostPosted: Wed May 17, 2006 12:38 am    Post subject: Reply with quote

Apprentice

Joined: 04 Jul 2005
Posts: 33
Location: London

Hi

The SWIFT samples that accompany the product should give you a good framework to learn from - is has a MT103 message set definition.

Best wishes
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 read the SWIFT message in ESQL & convert hex to A
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.