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 IndexIBM MQ API SupportPutDateTime throws Exception on Put

Post new topicReply to topic
PutDateTime throws Exception on Put View previous topic :: View next topic
Author Message
Lord_Heken
PostPosted: Wed Sep 05, 2012 11:47 am Post subject: PutDateTime throws Exception on Put Reply with quote

Newbie

Joined: 04 Sep 2012
Posts: 5

Hi,

This is the situation, I'm using amqmdnet with the PV 6.0.2.0.

I'm triying to send the PutDateTime value to the queue, but I can't find the correct datetime format or something like that.

I tried several formats using this.
Code:

         CultureInfo ctrDate = new CultureInfo("en-US", false);
            ctrDate.DateTimeFormat.ShortDatePattern = "yyyy/MM/dd";
            ctrDate.DateTimeFormat.LongDatePattern = "yyyy/MM/dd";
            ctrDate.DateTimeFormat.ShortTimePattern = "HH:mm:ss";
            ctrDate.DateTimeFormat.TimeSeparator = ":";
            ctrDate.DateTimeFormat.LongTimePattern = "HH:mm:ss";
            ctrDate.DateTimeFormat.FullDateTimePattern = "yyyy/MM/dd HH:mm:ss";
            System.Threading.Thread.CurrentThread.CurrentCulture = ctrDate;



OR

Code:

         CultureInfo ctrDate = new CultureInfo("en-US", false);
            ctrDate.DateTimeFormat.ShortDatePattern = "yyyyMMdd";
            ctrDate.DateTimeFormat.LongDatePattern = "yyyyMMdd";
            ctrDate.DateTimeFormat.ShortTimePattern = "HHmmss";
            ctrDate.DateTimeFormat.TimeSeparator = "";
            ctrDate.DateTimeFormat.LongTimePattern = "HHmmss";
            ctrDate.DateTimeFormat.FullDateTimePattern = "yyyyMMdd HHmmss";
            System.Threading.Thread.CurrentThread.CurrentCulture = ctrDate;


And still the PutDateTime is travelink null to the queue.

This is the code.

Code:

      IBM.WMQ.MQMessage vloSentMsg = new IBM.WMQ.MQMessage();
            IBM.WMQ.MQPutMessageOptions vloSentMsgOpt = new IBM.WMQ.MQPutMessageOptions();

            vloSentMsg.PutDateTime = DateTime.Now;
            
               typeOfRequierement = messageToSend.Substring(0, 3);
               vloSentMsg.MessageType = 8;
               vloSentMsg.PutApplicationType = 1;
               vloSentMsg.Persistence = 1;
               vloSentMsg.PutApplicationName = "Service";

   QueueManagerName = QueueManager;

         vcoControladorMQ = new IBM.WMQ.MQQueueManager(QueueManagerName);

vlnRequestOpenOptions = MQC.MQOO_SET_ALL_CONTEXT | MQC.MQOO_OUTPUT;

   vloRequestQ = vcoControladorMQ.AccessQueue(RequestQueueName, vlnRequestOpenOptions);               


vloSentMsg.Format = IBM.WMQ.MQC.MQFMT_STRING;
            vloSentMsg.MessageType = IBM.WMQ.MQC.MQMT_REQUEST;
            vloSentMsg.Expiry =  Timeout;
            vloSentMsg.CharacterSet =  CharacterSet;
            vloSentMsg.ReplyToQueueName = ReplyQueueName;


   vloSentMsg.ReplyToQueueManagerName = vcoControladorMQ.Name;      

vloRequestQ.Put(vloSentMsg, vloSentMsgOpt);

vloRequestQ.Close();   
vcoControladorMQ.Disconnect();      

------------------

Any Ideas?

Thanks!!!
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Sep 05, 2012 1:58 pm Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 8418
Location: US: west coast, almost. Otherwise, enroute.

Moved it to API support. Not sure exactly where it belongs...
_________________
There are two types of people in this world:
1) Those that can extrapolate from incomplete data
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Sep 05, 2012 3:37 pm Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20025
Location: LI,NY

If you want to set yourself date and time and not let the qmgr do it, you need to use different pmo options.(set all?), and have the right authorizations for it!

If you think that the date on the message as stated by MQ is off, remember that the information on the message is in UTC time.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Sep 05, 2012 4:02 pm Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I am also reluctant to understand
Quote:
PV 6.0.2.0
as anything other than "product version 6.0.2.0", and I find that a troubling version to be using, particularly with the .NET classes and XMS.

I'd encourage an investigation of the options to improve the product version to something fully and actually supported, like 7.5.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ API SupportPutDateTime throws Exception on Put
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.