|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Calling DB2 function inside esql code IIB |
« View previous topic :: View next topic » |
Author |
Message
|
anilmekala |
Posted: Tue Oct 27, 2015 11:10 pm Post subject: Calling DB2 function inside esql code IIB |
|
|
Acolyte
Joined: 19 Oct 2012 Posts: 63
|
Hi Experts,
I hope everybody doing good.
I have requirement to call DB2 function inside my esql code.
when i ran DB2 function inside DB2 studio its working fine and able to see results.
I tring to call DB2 function inside ESQL as below statements :
[SET stat =LOS_STATUS(leadID, stat) ;CREATE PROCEDURE LOS_STATUS(IN leadID CHAR, OUT stat CHAR) RETURNS CHARACTER LANGUAGE DATABASE EXTERNAL NAME "PLS.fn_crm_los_status";]
but am getting below exception :
RecoverableException
File:CHARACTER:F:\build\slot1\S900_P\src\DataFlowEngine\ImbRdl\ImbRdlRoutine.cpp
Line:INTEGER:1363
Function:CHARACTER:SqlRoutine::invoke
Type:CHARACTER:ImbESQLManager
Name:CHARACTER:ImbESQLManager
Label:CHARACTER:ImbESQLManager
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2934
Text:CHARACTER:Error occured in procedure
Insert
Type:INTEGER:5
Text:CHARACTER:LOS_STATUS
RecoverableException
File:CHARACTER:F:\build\slot1\S900_P\src\DataFlowEngine\MessageServices\ImbDatabaseManager.cpp
Line:INTEGER:2932
Function:CHARACTER:ImbDatabaseManager::getDBProcedureParameterInformation
Type:CHARACTER:ComIbmDatabaseConnectionManager
Name:CHARACTER:ComIbmDatabaseConnectionManager
Label:CHARACTER:ComIbmDatabaseConnectionManager
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2920
Text:CHARACTER:The procedure is unknown to the database and no definition could be found.
Insert
Type:INTEGER:5
Text:CHARACTER:YBMIDB.PLS.FN_CRM_LOS_STATUS
When call stored procedure its working fine and am able to see the results from DB2.
thanks in advance.
Regards,
Anil.[/code] |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Oct 28, 2015 12:52 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
This
Quote: |
The procedure is unknown to the database and no definition could be found.
|
Tells you where to start.
Does the user that is running the broker have access to the Stored procedure?
This will be different from the user that is running the SP interactively. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
mgk |
Posted: Wed Oct 28, 2015 3:35 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
You cannot call DB2 Stored Functions, only Procedures. Raise a requirement (RFE) if you would like to see this behaviour in a future version. As a workaround, can you wrap the Function in a Procedure with an OUT parameter for the RETURN value and call that instead...
Kind 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|