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 » ESQL stuff

Post new topic  Reply to topic
 ESQL stuff « View previous topic :: View next topic » 
Author Message
paulgroo
PostPosted: Wed Mar 07, 2007 4:42 am    Post subject: ESQL stuff Reply with quote

Centurion

Joined: 07 Jul 2005
Posts: 138
Location: Ireland

Hi everyone,

I've been trying to get something working in Message Broker and I just cant get it quite right...
I am receiving a message in plain text onto a queue, and I want the Compute node to read the text and send it to either one of two queues. (There are only two types of messages that arrive on this queue). The issue is with the message type Im using I think, I have a feeling I should be using BLOB messages (?). Has anyone here created similar ESQL for a compute node before?

I can post my ESQL code if needed...
Back to top
View user's profile Send private message MSN Messenger
jefflowrey
PostPosted: Wed Mar 07, 2007 5:02 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If you're not trying to model the data, then yes "plain text" = "BLOB".

Depending on what you mean by "read the text", you might need to CAST InputRoot.BLOB.BLOB as Character.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
paulgroo
PostPosted: Thu Mar 08, 2007 2:21 am    Post subject: Hi Jeff Reply with quote

Centurion

Joined: 07 Jul 2005
Posts: 138
Location: Ireland

Thanks for the reply! Yes, that sounds like what I need to do. Basically, two types of message arrive onto this queue and I want to the compute node to route one type to one queue and the other to a second queue.

I'm sort of new the whole ESQL bit and I was wondering if you knew of any comprehensive guides to writing ESQL? I've configured ESQL (with a lot of trial and error) to route XML messages but Im not sure what Im doing with 'BLOB' messages.


Last edited by paulgroo on Thu Mar 08, 2007 2:27 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
Vitor
PostPosted: Thu Mar 08, 2007 2:25 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

There's an ESQL manual, but it's not really a training aid. However, if you've got experience of other languages it should offer enough help to get you going....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
paulgroo
PostPosted: Thu Mar 08, 2007 2:29 am    Post subject: Reply with quote

Centurion

Joined: 07 Jul 2005
Posts: 138
Location: Ireland

Thanks Vitor! I'll give it a go anyway and see what I can do myself anyway. I think there's a few samples that I might be able to 'doctor' to suit my needs! Thanks for the reply!
Back to top
View user's profile Send private message MSN Messenger
jefflowrey
PostPosted: Thu Mar 08, 2007 6:10 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Let's pretend that the 30th to 40th position of your BLOB text have the routing token you will use to determine the final queue.

Your code would look something like
Code:
declare token CHARACTER;
set token = SUBSTRING(InputRoot.BLOB.BLOB from 30 for 10);
set token = CAST(token as Character CodedCharSetId InputRoot.Properties.CodedCharSetId);
if token = 'aaaaaaaaaa' then
       --route to queue 1
else if token == 'bbbbbbbbbb' then
       -- route to queue 2
end if;

_________________
I am *not* the model of the modern major general.
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 » ESQL stuff
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.