|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Assigning Value to a header field |
« View previous topic :: View next topic » |
Author |
Message
|
javaforvivek |
Posted: Fri Jul 23, 2004 7:14 am Post subject: Assigning Value to a header field |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
I have refered to many of the posts here, in this forum, which say that, while writing a MQ Base Java client, if you want to edit some field in the Message Header, you have to use following code.
Code: |
int openOptions = MQC.MQOO_OUTPUT | MQC.MQOO_SET_ALL_CONTEXT;
MQQueue que = qmgr.accessQueue(queueName,openOptions,null,null,null);
MQPutMessageOptions mputOptions = new MQPutMessageOptions();
mputOptions.options = MQC.MQPMO_SET_ALL_CONTEXT;
que.put(msg,mputOptions);
|
But when I tried the same code, and browsed the queue from MQ Explorer, in the Put Date/Time of the message, it showed 'Invalid Date Time' for my message.
Why is this so? Any solution to correct the put date/time? _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
kirani |
Posted: Fri Jul 23, 2004 7:48 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You should use this option when setting context fields. PutDate and PutTime are part of origina context information. So you must set those fields in your code before putting the message on the queue. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
kman |
Posted: Mon Jul 26, 2004 2:04 am Post subject: |
|
|
Partisan
Joined: 21 Jan 2003 Posts: 309 Location: Kuala Lumpur, Malaysia
|
If I read this correctly, your put was OK. But your put date/time format is wrong.
I suggest you look up the App Prog Ref to see the format used.. if not wrong in the format;
HHMMSShhh or something, and date is in
DDMMYYYY .. not sure on this. but 8 chars.
paste your code snippet here.  |
|
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
|
|
|
|