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 » Accessing database data from a message flow

Post new topic  Reply to topic
 Accessing database data from a message flow « View previous topic :: View next topic » 
Author Message
sebastian
PostPosted: Tue Oct 18, 2005 7:01 am    Post subject: Accessing database data from a message flow Reply with quote

Centurion

Joined: 12 Nov 2003
Posts: 110
Location: Philadelphia

I am trying to access a database from a message flow. I thought the database node would be the correct node to use for this but I do not see any area to configure the specific database, schema etc...

Has anyone done this before? I simply need to check a value in a table and if it meets a particular criteria, continue to process the message. Otherwise, the message should not continue to process.

Any help is appreciated,
Sebastian
_________________
sebastian signature
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Tue Oct 18, 2005 7:07 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You want to use a compute node, not a database node, I think.

Then you can return false if you don't want to continue processing.

The only thing that gets configured on any of the database capable nodes in WBIMB is the ODBC DataSource name for the database.

http://publib.boulder.ibm.com/infocenter/wbihelp/topic/com.ibm.etools.mft.doc/ac04660_.htm#ac04660_db

http://publib.boulder.ibm.com/infocenter/wbihelp/topic/com.ibm.etools.mft.doc/ac04670_.htm
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
sebastian
PostPosted: Tue Oct 18, 2005 8:17 am    Post subject: Reply with quote

Centurion

Joined: 12 Nov 2003
Posts: 110
Location: Philadelphia

Would you have any ESQL code examples of how to access the database? I'm sure after setting up the connection, it would just be a series of SQL statements but I'm not sure where to start with the ESQL.

thanks,
Seb
_________________
sebastian signature
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Tue Oct 18, 2005 8:20 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

sebastian wrote:
Would you have any ESQL code examples of how to access the database? I'm sure after setting up the connection, it would just be a series of SQL statements but I'm not sure where to start with the ESQL.


Have you considered getting training on this product? These are *basic* questions, and this is not a product that is easily learned on one's own.

You can use SELECT, INSERT, UPDATE, and DELETE as standard ESQL statements. The documentation provides full descriptions of which clauses the ESQL version of these statements supports, and which it doesn't, and provides simple and more complex examples of using them.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Prithvi
PostPosted: Tue Oct 18, 2005 9:36 am    Post subject: Reply with quote

Apprentice

Joined: 20 Dec 2004
Posts: 34

Sebastian,
you cannot change the message body in the database node, though you can decide whether or not to propagate the message further.
You might consider using something along the lines of:

SET Environment.Variables.temp[] = (SELECT T.Colunmn_Name FROM Database.Table_name AS T WHERE (condition));

IF Environment.Variables.temp.Column_Name = (desired_value) THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;

If you return false the message is not propagated. If you wish to record the message for auiting perposes, you could throw an user exception and connect the failure terminal to the audit_message queue.

Rgds
_________________
Prithvi
Back to top
View user's profile Send private message Yahoo Messenger
sebastian
PostPosted: Tue Oct 18, 2005 9:39 am    Post subject: Reply with quote

Centurion

Joined: 12 Nov 2003
Posts: 110
Location: Philadelphia

Thank you for your response. I am now hunting for ESQL examples of accessing a database.

Sebastian
_________________
sebastian signature
Back to top
View user's profile Send private message Visit poster's website
JT
PostPosted: Tue Oct 18, 2005 2:16 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

No need to hunt. Search this website for 'Passthru' or 'Select and Database'.

The information center also has examples: http://publib.boulder.ibm.com/infocenter/wbihelp/topic/com.ibm.etools.mft.doc/ak05800_.htm?
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue Oct 18, 2005 8:27 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Or better, take up the ESQL.pdf......it is available through this site or at the IBM redbooks site too....

The pdf is more than enough to get u started and get you through, through some complex database commands....
Back to top
View user's profile Send private message Send e-mail
sebastian
PostPosted: Wed Oct 19, 2005 3:18 am    Post subject: Reply with quote

Centurion

Joined: 12 Nov 2003
Posts: 110
Location: Philadelphia

Thanks for the tips guys. I really appreciate it.

take care,
Seb
_________________
sebastian signature
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Accessing database data from a message flow
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.