|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
2018 Error in MQPUT |
« View previous topic :: View next topic » |
Author |
Message
|
suresh_shahukaru |
Posted: Sat Apr 22, 2006 10:41 pm Post subject: 2018 Error in MQPUT |
|
|
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 |
|
 |
wschutz |
Posted: Sun Apr 23, 2006 4:15 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
Back to top |
|
 |
suresh_shahukaru |
Posted: Sun Apr 23, 2006 4:49 am Post subject: |
|
|
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 |
|
 |
suresh_shahukaru |
Posted: Sun Apr 23, 2006 5:24 am Post subject: |
|
|
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 |
|
 |
wschutz |
Posted: Sun Apr 23, 2006 11:08 am Post subject: |
|
|
 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 |
|
 |
suresh_shahukaru |
Posted: Mon Apr 24, 2006 7:34 am Post subject: |
|
|
Novice
Joined: 22 Apr 2006 Posts: 17
|
Fixed the code and is working fine now. Thanks |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|