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 » Invoke Mainframe stored procedure

Post new topic  Reply to topic
 Invoke Mainframe stored procedure « View previous topic :: View next topic » 
Author Message
sandy vish
PostPosted: Wed Jun 12, 2013 4:33 am    Post subject: Invoke Mainframe stored procedure Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Jun 12, 2013 4:49 am    Post subject: Reply with quote

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
View user's profile Send private message
sandy vish
PostPosted: Wed Jun 12, 2013 4:57 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Jun 12, 2013 5:09 am    Post subject: Reply with quote

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
View user's profile Send private message
sandy vish
PostPosted: Wed Jun 12, 2013 5:21 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Jun 12, 2013 6:33 am    Post subject: Reply with quote

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
View user's profile Send private message
sandy vish
PostPosted: Thu Jun 13, 2013 1:16 am    Post subject: Reply with quote

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
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 » Invoke Mainframe stored procedure
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.