Author |
Message
|
tcova |
Posted: Mon Aug 02, 2004 6:19 am Post subject: Using MQSeries in sub-programs. |
|
|
Newbie
Joined: 02 Aug 2004 Posts: 2
|
I am in a mainframe/COBOL environment under a DB2 WLM environment. I am calling a lower level sub-routine that is trying to do a MQCONN and the HCONN is coming back as zeroes. I take the same code and move it to the top most program and it works.
Is there a problem with using MQSERIES in a lower level sub-routine??
I am going to have many programs calling this sub-routine and it would not be feasable to statically link them.
Any suggestions on how to get this to work???? |
|
Back to top |
|
 |
kman |
Posted: Mon Aug 02, 2004 8:00 pm Post subject: |
|
|
Partisan
Joined: 21 Jan 2003 Posts: 309 Location: Kuala Lumpur, Malaysia
|
I don't understand lower level, and top level.
How do you pass your connection handle?
It sounds like you did not pass the handle, or you reinit the handle to zero. |
|
Back to top |
|
 |
tcova |
Posted: Tue Aug 03, 2004 5:17 am Post subject: |
|
|
Newbie
Joined: 02 Aug 2004 Posts: 2
|
KMAN,
A main program would be a top level and any called sub-routines would be lower level programs. One of the lower level called subroutines is doing the "MQCONN" and getting back a zero in the handle connect. It is not passing it to any other program. It is getting the zero in the program that does the MQCONN. But when I take the exact code from the subroutine and put it in the main program, it works fine. So it is not the coding or the environment that is causing the problem, it is something else. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 03, 2004 5:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What is the reason code and completion code given when you receive a zero connection handle? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Aug 03, 2004 9:26 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Is the lower level program compiled succesfully with the appropriate MQ stub? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
kman |
Posted: Tue Aug 03, 2004 4:16 pm Post subject: |
|
|
Partisan
Joined: 21 Jan 2003 Posts: 309 Location: Kuala Lumpur, Malaysia
|
Peter, I would think he compiled ok, from his description that it does ok when running, or putting it in the main program.
Does this subroutine did another mqconn after the main routine? It is possible for this, so the completion code and reason as asked by Jeff would help here. Possibly, code snippet from the main routine and the subroutine here. |
|
Back to top |
|
 |
|