Author |
Message
|
vsr |
Posted: Tue Dec 19, 2006 7:55 am Post subject: Failure to call a Java Procedure |
|
|
Centurion
Joined: 04 Apr 2006 Posts: 104
|
Hi,
I am new to Message broker .I am trying to call a java procedure from the flow using MB V5.0.2 . Here is the code:
SET action = JDeptFilter('String');
Got error here which says 'Procedures can't be used as right-hand side in assignment' , is it wrong ?
I defined procedure JDeptFilter like this:
CREATE PROCEDURE JDeptFilter(IN DEPT_NUM CHARACTER)
RETURNS CHARACTER
LANGUAGE JAVA
EXTERNAL NAME "com.xxx.Class.myMethod";
but I am getting error saying syntax error saying ' Syntax Error. Valid Options include blah blah blah .. '
But I saw in the esql pdf using the same statements .. how can it be wrong .. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Dec 19, 2006 7:58 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Try using CALL. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
vsr |
Posted: Tue Dec 19, 2006 8:02 am Post subject: |
|
|
Centurion
Joined: 04 Apr 2006 Posts: 104
|
Jeff,
I tried using CALL JDeptFilter('String') INTO action;
Getting error again saying 'Syntax Error.Valid options include EXTERNAL '.
Any suggestions ? |
|
Back to top |
|
 |
vsr |
Posted: Tue Dec 19, 2006 8:51 am Post subject: |
|
|
Centurion
Joined: 04 Apr 2006 Posts: 104
|
Do i need to install any fix pack for this ? |
|
Back to top |
|
 |
JosephGramig |
Posted: Tue Dec 19, 2006 10:35 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
|
Back to top |
|
 |
JosephGramig |
Posted: Tue Dec 19, 2006 10:39 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
Note that you are declaring in ESQL with PROCEDURE, but you are using INTO that goes with FUNCTION in ESQL. _________________ Joseph
Administrator - IBM WebSphere MQ (WMQ) V6.0, IBM WebSphere Message Broker (WMB) V6.1 & V6.0
Solution Designer - WMQ V6.0
Solution Developer - WMB V6.1 & V6.0, WMQ V5.3 |
|
Back to top |
|
 |
mgk |
Posted: Tue Dec 19, 2006 2:13 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
The ability for ESQL to CALL a Java method was only introduced in V5 fixpac 4.
Also INTO does belong with the CALL statement and is used to pickup the RETURN value from a FUNCTION or a PROCEDURE, it does not matter which as long at the routine being called is declared with a RETURNS clause.
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
|