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 » 2018 Error in MQPUT

Post new topic  Reply to topic
 2018 Error in MQPUT « View previous topic :: View next topic » 
Author Message
suresh_shahukaru
PostPosted: Sat Apr 22, 2006 10:41 pm    Post subject: 2018 Error in MQPUT Reply with quote

Novice

Joined: 22 Apr 2006
Posts: 17

I have a PL/1 code which does the following:

1. Gives a call to MQCONN and gets the HCONN (conn. handle)
2. Gives a call to MQOPEN to open the queue.
3. Reads IMS DB, formats the data into a message
4. Puts the formatted message onto the Queue.

performs steps 3 and 4 until all the IMS DB records are done.

Problem:

First MQPUT is successful, from the second MQPUT, its gives the error 2018 saying invalid connection handle but code wise everything looks fine. Given the print of HCONN and the binary value is proper and it didnt got lost.

I tried doing only one put and then MQCLOSE, at that time also, the MQPUT was successful and MQCLOSE failed with the same reason code 2018.

Please help me...
Back to top
View user's profile Send private message
wschutz
PostPosted: Sun Apr 23, 2006 4:15 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Is this new code or has this been working and now doesn't?

You are aware that after taking a syncpoint, the IMS adapter invalidates the connection and object handles, except in a batch-oriented BMP.
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzal.doc/imsapps.htm
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
suresh_shahukaru
PostPosted: Sun Apr 23, 2006 4:49 am    Post subject: Reply with quote

Novice

Joined: 22 Apr 2006
Posts: 17

It is a new program and we are using MQ for the first time.

Such a scenario is there for MQGET as well where there are multiple MQGETs after a MQCONN and MQOPEN and it is working fine.

For MQPUT, we are just giving the OPTIONS as SET_ALL_CONTEXT

Please suggest what shall I do? Do I need to code using MQPUT1?
Back to top
View user's profile Send private message
suresh_shahukaru
PostPosted: Sun Apr 23, 2006 5:24 am    Post subject: Reply with quote

Novice

Joined: 22 Apr 2006
Posts: 17

Multiple MQGETs in the same unit of work is working fine because we didnt have any IMS commit using IOPCB in that program

But in the multiple MQPUT program, we have got IMS commit for every MQPUT where the IMS thinks that the unit of work is done and closes all the open handles.

Now, if I still want to have the IMS Commit, do I need to do the following in loop or is there any other approach that I can follow:

MQCONN
MQPUT1
IMS Commit

MQDISC not required as IMS Commit will anyway closes all the open handles. Please validate this statement.
Back to top
View user's profile Send private message
wschutz
PostPosted: Sun Apr 23, 2006 11:08 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Unless its a batch BMP, you loose the connection handle when you do the IMS commit. So you have to reconnect to MQ. MQPUT1 is a good choice if you are only putting 1 message within each LUW.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
suresh_shahukaru
PostPosted: Mon Apr 24, 2006 7:34 am    Post subject: Reply with quote

Novice

Joined: 22 Apr 2006
Posts: 17

Fixed the code and is working fine now. Thanks
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 » 2018 Error in MQPUT
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.