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 » WBI - Compute Node ESQL for database problem.

Post new topic  Reply to topic
 WBI - Compute Node ESQL for database problem. « View previous topic :: View next topic » 
Author Message
schroederms
PostPosted: Thu Jan 20, 2005 8:25 am    Post subject: WBI - Compute Node ESQL for database problem. Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

I'm having a problem deploying a WBI simple flow. I've been reading the WBI Message Broker Basics to get a feel for the new toolkit, since working in the V 2.1 world. I started to do the BookstoreFlow example and thought I could add some ESQL to the compute node to go against one of our database tables in our AIX sandbox environment to see if I could get it to work, with no success.

What I've done.

1) The compute node has the property for Data Source set to EAI_MSGSRV.

2) Our sandbox (SP20), has in the .odbc.ini file the EAI_MSGRV section for our ORacle database information, this .ini file is the same that we use on DEV and PRD (AIX) currently running under v2.1

3) I right click on my BookstoreFlow to "Run on Server", and I get Publishing was complete with warnings.

4) I look at the the Log in the Broker Administrative Perspective and I see it does not like the alias "t" (Messages below in red). This is the way I coded it in 2.1, so I migrated a flow from v2.1 to 5 just to see if the code had changed in migration for the syntax on the DB call but it did not. So, I was wondering what I'm doing wrong. Orginal esql file in green below.

Thanks in advance,
Mike


BIP2432E: (.READDB, 3.15) : The correlation name 't' is not valid. Those in scope are: , Environment, InputLocalEnvironment, OutputLocalEnvironment, InputRoot, InputBody, InputProperties, OutputRoot, InputExceptionList, OutputExceptionList, InputDestinationList, OutputDestinationList, APPLICATION_SERVICES.

The first element of a field reference must be a valid correlation name, from those in scope. This message may sometimes be due to an incorrectly formed or spelled expression which is not intended to be a field reference being parsed as if it were a field reference because the parser does not recognize it.

Correct the syntax of the expression and redeploy the message flow.




CREATE COMPUTE MODULE BookstoreFlow_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN

CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();

CALL READDB();

RETURN TRUE;
END;

CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;

CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;

CREATE PROCEDURE READDB() BEGIN
Set OutputLocalEnvironment.APPLICATION_SERVICES.OUT_DATA[] =
(SELECT t.FUNCTION,
t.REALTIME,
t.SERVICE_QUEUE,
t.SERVICE_QUEUE_MGR,
t.DESCRIPTION,
t.XML_FORMAT,
t.EXAMPLE_XML
FROM Database.EAI_MSGSRV.APPLICATION_SERVICES as t);

END;

END MODULE;
Back to top
View user's profile Send private message
JT
PostPosted: Thu Jan 20, 2005 9:28 am    Post subject: Reply with quote

Padawan

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

Surround the SELECT statement with quotes:

Code:
Set OutputLocalEnvironment.APPLICATION_SERVICES.OUT_DATA[] =
('SELECT t.FUNCTION,
         t.REALTIME,
         t.SERVICE_QUEUE,
         t.SERVICE_QUEUE_MGR,
         t.DESCRIPTION,
         t.XML_FORMAT,
         t.EXAMPLE_XML
FROM Database.EAI_MSGSRV.APPLICATION_SERVICES as t')
Back to top
View user's profile Send private message
schroederms
PostPosted: Thu Jan 20, 2005 10:57 am    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

JT,

It now looks like this below in green and am getting back what is in red. Is there a difference in how you code within a PROCEDURE verses not using a PROCEDURE. The reason I ask is because the migrated code does not put quotes around the SELECT statement. I've seen this when using a PassThru, but in this case I not doing that.

Thanks,
Mike


CREATE COMPUTE MODULE BookstoreFlow_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN

CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();

CALL READDB();

RETURN TRUE;
END;

CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;

CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;

CREATE PROCEDURE READDB() BEGIN
Set OutputLocalEnvironment.APPLICATION_SERVICES.OUT_DATA[] =
('SELECT t.FUNCTION,
t.REALTIME,
t.SERVICE_QUEUE,
t.SERVICE_QUEUE_MGR,
t.DESCRIPTION,
t.XML_FORMAT,
t.EXAMPLE_XML
FROM Database.EAI_MSGSRV.APPLICATION_SERVICES as t');

END;

END MODULE;



BIP2496E: (.READDB, 2.3) : Illegal second argument to SUBSTRING function.

The second argument must be an integer giving a valid start position in the string.

Correct the syntax of the expression and redeploy the message flow.
Back to top
View user's profile Send private message
schroederms
PostPosted: Thu Jan 20, 2005 11:51 am    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

I seemed to got passed the errors by removing [] from APPLICATION_SERVICES.OUT_DATA, still not getting any data, but onto the next problem.
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 » WBI - Compute Node ESQL for database problem.
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.