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 » Mainframe, CICS, TXSeries » MQPUT but message does not get on the queue

Post new topic  Reply to topic
 MQPUT but message does not get on the queue « View previous topic :: View next topic » 
Author Message
AnJa026
PostPosted: Wed Oct 10, 2012 7:45 am    Post subject: MQPUT but message does not get on the queue Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Oct 10, 2012 8:05 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You don't use MQCONN in CICS, it's a noop.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 10, 2012 8:17 am    Post subject: Re: MQPUT but message does not get on the queue Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Wed Oct 10, 2012 8:22 am    Post subject: Re: MQPUT but message does not get on the queue Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed Oct 10, 2012 8:43 am    Post subject: Re: MQPUT but message does not get on the queue Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Oct 10, 2012 8:45 am    Post subject: Re: MQPUT but message does not get on the queue Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Wed Oct 10, 2012 8:49 am    Post subject: Re: MQPUT but message does not get on the queue Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Wed Oct 10, 2012 8:49 am    Post subject: Re: MQPUT but message does not get on the queue Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed Oct 10, 2012 9:48 am    Post subject: Re: MQPUT but message does not get on the queue Reply with quote

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
View user's profile Send private message
AnJa026
PostPosted: Thu Oct 11, 2012 1:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Oct 11, 2012 4:42 am    Post subject: Reply with quote

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
View user's profile Send private message
AnJa026
PostPosted: Thu Oct 11, 2012 4:57 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Oct 11, 2012 5:51 am    Post subject: Reply with quote

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
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 » Mainframe, CICS, TXSeries » MQPUT but message does not get on the queue
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.