Author |
Message
|
AnJa026 |
Posted: Wed Oct 10, 2012 7:45 am Post subject: MQPUT but message does not get on the queue |
|
|
Newbie
Joined: 10 Oct 2012 Posts: 3
|
Hi,
Getting a message onto a queue with COBOL in CICS, the sequence is:
Call MQCONN
Call MQOPEN
Call MQPUT
Buffer do have data in it (not empty)
Call MQCLOSE
Call MQDISC
The results of all the above calls are:
Compcode = zeroes
Reason = zeroes
Yet the queue have no message(s) on it.
The "downstream" proccesses have all been halted, nobody is draining the queue.
The same queue gets the messages if the put was done in Batch mode COBOL
When the queue is disabled, the MQPUT returns this error:
MQPUT ERROR: 0000000002 MQPUT REASON: 0000002051
When the queue is enabled again, no error (return codes = 0) but with no message on the queue
It would be appreciated if this situation can be explained/rectified |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Oct 10, 2012 8:05 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You don't use MQCONN in CICS, it's a noop. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 10, 2012 8:17 am Post subject: Re: MQPUT but message does not get on the queue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
AnJa026 wrote: |
Yet the queue have no message(s) on it. |
How do you know that? Is that because when something tries to get the message from the queue, they get a 2033 or because when you examine the queue the depth is zero?
Given that you're talking about CICS / COBOL I'm assuming z/OS and notice there's no commit shown in your code. Which would mean there are plenty of messages in the queue, but none of them can be retrieved.
AnJa026 wrote: |
The "downstream" proccesses have all been halted, nobody is draining the queue. |
Because they've told you this, or because you've checked IPPROCS is zero?
AnJa026 wrote: |
The same queue gets the messages if the put was done in Batch mode COBOL |
Which does a commit through the batch adapter.
AnJa026 wrote: |
It would be appreciated if this situation can be explained/rectified |
I don't think your CICS code is committing the messages. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
exerk |
Posted: Wed Oct 10, 2012 8:22 am Post subject: Re: MQPUT but message does not get on the queue |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Vitor wrote: |
Given that you're talking about CICS / COBOL I'm assuming z/OS and notice there's no commit shown in your code... |
I'm not that up on z/OS, but isn't it implicitly transactional, i.e. everything is automatically in Units-of-Work and the explicit MQCLOSE is an implicit MQCOMMIT? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 10, 2012 8:43 am Post subject: Re: MQPUT but message does not get on the queue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
exerk wrote: |
Vitor wrote: |
Given that you're talking about CICS / COBOL I'm assuming z/OS and notice there's no commit shown in your code... |
I'm not that up on z/OS, but isn't it implicitly transactional, i.e. everything is automatically in Units-of-Work and the explicit MQCLOSE is an implicit MQCOMMIT? |
It is implicitly transactional, so the puts are in a UoW. The MQCLOSE isn't an implicit commit, the MQDISC is. As @mqjeff correctly points out, connecting and disconnecting under CICS doesn't work even if you code them. So my suspicion is that these messages are uncommited as according to the OP similar code works in batch, which does do a connect & disconnect.
Another way to test it would be to shut down CICS and see if this flood of messages turn up, but IMHO just checking for non-zero queue depth and no browsable messages is quicker and safer.... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Oct 10, 2012 8:45 am Post subject: Re: MQPUT but message does not get on the queue |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vitor wrote: |
As @mqjeff correctly points out, connecting and disconnecting under CICS doesn't work even if you code them. |
Next, you'll get a java question correct. |
|
Back to top |
|
 |
exerk |
Posted: Wed Oct 10, 2012 8:49 am Post subject: Re: MQPUT but message does not get on the queue |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Vitor wrote: |
...The MQCLOSE isn't an implicit commit, the MQDISC is... |
Thank you! Another nugget of information filed away and misconcpetion consigned to the bin  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
exerk |
Posted: Wed Oct 10, 2012 8:49 am Post subject: Re: MQPUT but message does not get on the queue |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
mqjeff wrote: |
Vitor wrote: |
As @mqjeff correctly points out, connecting and disconnecting under CICS doesn't work even if you code them. |
Next, you'll get a java question correct. |
Don't tempt fate...  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 10, 2012 9:48 am Post subject: Re: MQPUT but message does not get on the queue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
Vitor wrote: |
As @mqjeff correctly points out, connecting and disconnecting under CICS doesn't work even if you code them. |
Next, you'll get a java question correct. |
Who are you and what have you done with the real mqjeff????? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
AnJa026 |
Posted: Thu Oct 11, 2012 1:26 am Post subject: |
|
|
Newbie
Joined: 10 Oct 2012 Posts: 3
|
Thank You everybody that replied.
Problem resolved!!!
Caused by not having a commit.
Because the commit is also performed in the MQDISC, but the disconnect is not working in CICS (even if coded), no commit was perfomed.
MQCMIT is also not allowed in CICS ????, however exec cics syncpoint does the commit, NP
Once again thank you, it is much appreciated. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Oct 11, 2012 4:42 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
AnJa026 wrote: |
MQCMIT is also not allowed in CICS ???? |
It's allowed in the same way MQCONN & MQDISC are allowed. None of them actually do anything because....
AnJa026 wrote: |
however exec cics syncpoint does the commit, NP |
....CICS is the connection and transaction controller not the queue manager. You can't "connect" to the queue manager, only get a connection which CICS has already established. You can't commit through the queue manager, because CICS is controlling the UoW. So you need to commit through CICS (or rollback) as you indicate. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
AnJa026 |
Posted: Thu Oct 11, 2012 4:57 am Post subject: |
|
|
Newbie
Joined: 10 Oct 2012 Posts: 3
|
Thanks Vitor.
I allways say that if nothing goes wrong, you will not learn anything
I have learned a lot with this one |
|
Back to top |
|
 |
Vitor |
Posted: Thu Oct 11, 2012 5:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
AnJa026 wrote: |
allways say that if nothing goes wrong, you will not learn anything |
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|