Author |
Message
|
jimliu |
Posted: Wed Aug 28, 2002 12:17 pm Post subject: Problems w/ querying a database in the compute node... |
|
|
Novice
Joined: 19 Dec 2001 Posts: 12
|
Hi,
I seemed to be having problems querying a database from the compute node. I set up my database as an input (window in the top left corner) exactly the same as my DataInsert node which works perfectly.
Database: MQSIUSR
Table: JIMLIU.MACHINETYPE
(the JIMLIU portion is the SCHEMA which is required since my database was setup under a different user id than what was used to install WMQI).
My ESQL which contains the SQL is as follows:
SET TMPMACHINETYPE = THE (SELECT ITEM RTRIM(JIMLIU.MACHINETYPE) FROM Database.JIMLIU.MACHINEDATA WHERE JIMLIU.PRODUCTFAMILY = InputBody.ServiceRequest.Problem[LOOPCNT].Product[LOOPCNT2].Family);
TMPMACHINETYPE is defined as 'char'. Error on the event log indicates there is something wrong in the SQL but it doesn't specify what (big surprise). Also, 9 out of 10 times, my input msg simply disappears...it doesn't end up on the output queue or the Dead Letter queue.
Any ideas?
Running v 2.1 w/ latest CSD.
Thanks,
Jim |
|
Back to top |
|
 |
TonyD |
Posted: Wed Aug 28, 2002 2:41 pm Post subject: |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
As a start I would suggest connecting an MQOutput node to the failure terminal of your MQInput node and running youf flow with Trace on. |
|
Back to top |
|
 |
lillo |
Posted: Wed Aug 28, 2002 10:47 pm Post subject: |
|
|
Master
Joined: 11 Sep 2001 Posts: 224
|
Try the following code:
SET TMPMACHINETYPE = THE (SELECT ITEM RTRIM(T.MACHINETYPE) FROM Database.JIMLIU.MACHINEDATA AS T WHERE T.PRODUCTFAMILY = InputBody.ServiceRequest.Problem[LOOPCNT].Product[LOOPCNT2].Family);
It´s just a guess, but may work. I just add the alias T and change the database fields reference adding the alias.
Cheers, _________________ Lillo
IBM Certified Specialist - WebSphere MQ |
|
Back to top |
|
 |
jimliu |
Posted: Thu Aug 29, 2002 1:45 pm Post subject: |
|
|
Novice
Joined: 19 Dec 2001 Posts: 12
|
Thanks Lillo...that did the trick (though I thought i had something similar beforehand).
Strange thing though...the messages continue to disappear every once in a while some showing up on the queue I attached to the Failure node while some not. I'd say its about 50/50 the msg will show up on the actual output data queue and about 25% that it will show up on the failure queue if something goes wrong. I'm using RFHUTIL to put the XML msgs onto the input queue.
Any suggestions?
Thanks,
Jim |
|
Back to top |
|
 |
kirani |
Posted: Thu Aug 29, 2002 5:16 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Jim,
Probably remaining 25% messages are in DLQ and/or discarded by nodes (if terminals are not connected) in a message flow. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|