IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Connect to MQ from DB2 Stored Procedure


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 83
Location: Bangalore

PostPosted: Thu Aug 19, 2010 2:50 am
Reply with quote

Hi,
I am trying to connect to MQ from a COBOL Stored Procedure.

I am using the MQCONN Function. Below is the Call

Code:
CALL 'MQCONN'      USING MQ-MQM   
                                       MQ-HCONN
                                       MQ-CC   
                                       MQ-REASON


But I get an error

MQ CC: 2
MQ REASON: 2129

Is there something what I am doing wrong, or do we need to give any parameters while Compiling or Lind Editing the Stored Procedure or any DB2 Setup that needs to be done before we try to Connect to MQ from DB2 Stored Procedure
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Aug 19, 2010 2:59 am
Reply with quote

Hello,

Is this batch or CICS?

What invokes the stored procedure?

Will the bit of posted code work in a subroutine that is not a stored procedure?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 19, 2010 3:10 am
Reply with quote

I assume you have included the MQ Stubs during your compilation of the SP.

the 2129 programmer response is: Ensure that the correct library concatenation has been specified in the batch application program execution JCL, and in the queue-manager startup JCL.
Back to top
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 83
Location: Bangalore

PostPosted: Thu Aug 19, 2010 3:12 am
Reply with quote

The Posted Code works in a COBOL program, since I give the load Programs in the JCLLLIB Concatenation Step.
But when I put the same in A COBOL STORED PROCEDURE it does not work.

The COBOL Stored Procedure is invoked Through MQ Listener. So I assume the Module is not being loaded. So I am just looking for ways I can link the module with the Stored Procedure
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Connect Direct 6.3 for Z/OS All Other Mainframe Topics 20
No new posts Invoke stored procedure via batch JCL. DB2 2
No new posts Getting TWA in CICS program while con... CICS 14
No new posts Calling COBOL DB2 program from a COBO... COBOL Programming 2
No new posts Cond parameter and Rc code of a proce... JCL & VSAM 5
Search our Forums:

Back to Top