|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Invoke Mainframe stored procedure |
« View previous topic :: View next topic » |
Author |
Message
|
sandy vish |
Posted: Wed Jun 12, 2013 4:33 am Post subject: Invoke Mainframe stored procedure |
|
|
Apprentice
Joined: 18 Nov 2012 Posts: 27
|
Hi All,
working on MB
Version: 7.0.0.4 ,trying to call a stored procedure with Mainframe Database ,
[code]
CALL STORE12(
NEW_CDE,NEW_NUM,recode,statusOut,error,Environment.Variables.a9[],
Environment.Variables.a8[],Environment.Variables.a7[],Environment.Variables.a6[],
Environment.Variables.a5[],Environment.Variables.a4[],Environment.Variables.a3[],
Environment.Variables.a2[],Environment.Variables.a1[],Environment.Variables.retrievecust[]);
CREATE PROCEDURE STORE12(IN NEW_CDE INTEGER,
IN NEW_NUM INTEGER,
OUT RECDE CHAR,
OUT CODE INTEGER,
OUT ERROR CHAR)
LANGUAGE DATABASE
DYNAMIC RESULT SETS 10
EXTERNAL NAME "TEST.STORE12";[code]
failing with an error,any help highly appreciated.r we missing any thing....
Quote: |
The procedure is unknown to the database and no definition could be found. |
while when we use PASSTHRU(*we are aware of PASSTHRU limitations) is passed through the below query is executed.
SET Environment.Variables.a[] = PASSTHRU('CALL TEST.STORE12(?,?,?,?,?)',NEW_CDE,NEW_NUM,recode,statusOut,error);
This is executed successfully.
2 points to get clarified.
1) why is the statement executed when we use PASSTHRU
2) why this is getting failed when we are using create statement |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jun 12, 2013 4:49 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Anything ending with "[]" is not a single value, it is a set of values. |
|
Back to top |
|
 |
sandy vish |
Posted: Wed Jun 12, 2013 4:57 am Post subject: |
|
|
Apprentice
Joined: 18 Nov 2012 Posts: 27
|
Thank you for the quick reply,
I have 10 result sets which iam expecting in the result of the procdure.
So mentioned this parameter as
CALL STORE12(NEW_CDE,NEW_NUM,recode,statusOut,error,Environment.Variables.a9[],
Environment.Variables.a8[],Environment.Variables.a7[],Environment.Variables.a6[],
Environment.Variables.a5[],Environment.Variables.a4[],Environment.Variables.a3[],
Environment.Variables.a2[],Environment.Variables.a1[],Environment.Variables.retrievecust[]);
do you mean to remove the Environment.Variables.a9[]-->[]
from the above statement.
Thank you very much....  |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jun 12, 2013 5:09 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I mean that Environment.Variables.a9[] does not produce a single value, it produces a list of values.
So it will never match any of the parameters that are defined on the mainframe procedure, since they are all base data types that hold single values.
I offer no advice about how to correct this. |
|
Back to top |
|
 |
sandy vish |
Posted: Wed Jun 12, 2013 5:21 am Post subject: |
|
|
Apprentice
Joined: 18 Nov 2012 Posts: 27
|
Understood the point, however we are having DYNAMIC RESULT SETS 10
so how do we call the procedure which are having base data types that hold single values.
Quote: |
CREATE PROCEDURE STORE12(IN NEW_CDE INTEGER,
IN NEW_NUM INTEGER,
OUT RECDE CHAR,
OUT CODE INTEGER,
OUT ERROR CHAR)
LANGUAGE DATABASE
DYNAMIC RESULT SETS 10 EXTERNAL NAME "TEST.STORE12";
|
Please clarify.
we are not aware of the exact stored procedure DDL,
Do we need mention the exact name as per the database stroed procedure NEW_CDE INTEGER,
IN NEW_NUM INTEGER,
OUT RECDE CHAR,
OUT CODE INTEGER,
OUT ERROR CHAR;
Thanks in advance.  |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jun 12, 2013 6:33 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Well, again, for "IN NEW_NUM INTEGER", you need to provide a SINGLE value that is an INTEGER value.
I suggest you review the InfoCenter for information on Dynamic Result Sets. |
|
Back to top |
|
 |
sandy vish |
Posted: Thu Jun 13, 2013 1:16 am Post subject: |
|
|
Apprentice
Joined: 18 Nov 2012 Posts: 27
|
Hi All...
.
Quote: |
Well, again, for "IN NEW_NUM INTEGER", you need to provide a SINGLE value that is an INTEGER value.
I suggest you review the InfoCenter for information on Dynamic Result Sets. |
We have a different servie where we have done similar functionality, and the service is working fine(thats oracle stored procedure)
Can anybody show some light on this.....
Any help higly appreciated.thanks in advance |
|
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
|
|
|
|