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 » General IBM MQ Support » Assigning Value to a header field

Post new topic  Reply to topic
 Assigning Value to a header field « View previous topic :: View next topic » 
Author Message
javaforvivek
PostPosted: Fri Jul 23, 2004 7:14 am    Post subject: Assigning Value to a header field Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
kirani
PostPosted: Fri Jul 23, 2004 7:48 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
kman
PostPosted: Mon Jul 26, 2004 2:04 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Assigning Value to a header field
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.