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 » Unexpected output while using PASSTHRU

Post new topic  Reply to topic
 Unexpected output while using PASSTHRU « View previous topic :: View next topic » 
Author Message
ishaq
PostPosted: Mon Mar 03, 2008 4:29 am    Post subject: Unexpected output while using PASSTHRU Reply with quote

Novice

Joined: 18 Feb 2008
Posts: 11

Hi,

Iam using WMB 6.0 on Windows XP.Below is my issue:

Iam having the flow consisting of input,output and Javacompute node.
I am trying to retrieve the data from database corresponding to the input.

database table name is vicnum2text and it has 2 columns named as number_integer and number_text

My input is as follows
<numbers><num>one</num></numbers>

The code which Iam using to retrieve the data from database is:
MbSQLStatement state = createSQLStatement( "Test", "SET OutputRoot.XML.numbers.res = PASSTHRU ('SELECT number_integer FROM " + table + " WHERE number_text = ?',OutputRoot.XML.numbers.num);") ;

Iam getting the output along with column name as shown below:
<numbers><num>one</num><res><NUMBER_INTEGER>1</NUMBER_INTEGER></res></numbers>

Iam expecting the output without the column name.

Please help me out in this regard
Back to top
View user's profile Send private message
gregop
PostPosted: Mon Mar 03, 2008 5:23 am    Post subject: Reply with quote

Voyager

Joined: 24 Nov 2006
Posts: 81

That is the expected behaviour on a PASTHRU select.

If you want to lose the column name you'll need to use the selectclause ITEM and not use PASSTHRU.

Something like: SELECT ITEM number_integer from Database.vicnum2text
Back to top
View user's profile Send private message
ishaq
PostPosted: Mon Mar 03, 2008 10:22 pm    Post subject: Reply with quote

Novice

Joined: 18 Feb 2008
Posts: 11

Thanks a lot..Its working fine

I do have a doubt regarding setting Environment variables.
My requirement is that after retrieving the data from the database I need to set that value in Evironment variables and lateron use that variable and manipulate it and add it to the output message.
While setting the value I can directly use SET Environment.variables.... in the createSQLStatement.
How do I retrieve the value lateron to manipulate it in the java code

Please help me out in this regard
Back to top
View user's profile Send private message
AkankshA
PostPosted: Mon Mar 03, 2008 10:28 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

you can access the environment tree (referred as global environment) inside a java comute node
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
ishaq
PostPosted: Tue Mar 04, 2008 12:54 am    Post subject: Reply with quote

Novice

Joined: 18 Feb 2008
Posts: 11

can you please explain it?
Back to top
View user's profile Send private message
AkankshA
PostPosted: Tue Mar 04, 2008 12:58 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

chk out ..

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac30330_.htm
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
ishaq
PostPosted: Tue Mar 04, 2008 1:43 am    Post subject: Reply with quote

Novice

Joined: 18 Feb 2008
Posts: 11

Thanks a lot....Its working fine now
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 » Unexpected output while using PASSTHRU
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.