Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Connect to MQ from DB2 Stored Procedure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Thu Aug 19, 2010 2:50 am    Post subject: Connect to MQ from DB2 Stored Procedure
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

Site Director


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

PostPosted: Thu Aug 19, 2010 2:59 am    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Thu Aug 19, 2010 3:10 am    Post subject:
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: 85
Location: Bangalore

PostPosted: Thu Aug 19, 2010 3:12 am    Post subject: Reply to: Connect to MQ from DB2 Stored Procedure
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    IBMMAINFRAMES.com Support Forums -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Connect:Direct - RC=000000FF MSG=SVTM... R.Manivannan All Other Mainframe Topics 3 Fri Apr 21, 2017 1:30 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us