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 » IBM MQ API Support » Empty putTime and putDate in Java

Post new topic  Reply to topic
 Empty putTime and putDate in Java « View previous topic :: View next topic » 
Author Message
mattfarney2
PostPosted: Thu Nov 12, 2020 3:31 pm    Post subject: Empty putTime and putDate in Java Reply with quote

Newbie

Joined: 12 Nov 2020
Posts: 2

I have received some messages without putTime and putDate that caused my application issues. I'm trying to simulate these transactions, but the current version of the Java MQMD class has a single GregorianCalendar instead of individual char fields.

The MQMD1 header does have the smaller fields, but without better examples, I do not think I'll be able to get that to work. The copyFrom and copyTo operations throw null pointer exceptions - and the documentation does not specify what fields are required for either operation.

I have two questions:

1. Is there an easy way to generate an MQ message in Java with null and/or empty putTime/putDate fields?

2. Has anyone seen any examples of MQMD1 usage in Java?

-mf
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Nov 12, 2020 5:08 pm    Post subject: Reply with quote

Poobah

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

1. MQC.MQPMO_NO_CONTEXT

Read https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.javadoc.doc/WMQJavaClasses/com/ibm/mq/MQPutMessageOptions.html

2. A quick google search for 'java mqmd1' https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.2.0/com.ibm.mq.javadoc.doc/WMQJavaClasses/com/ibm/mq/headers/MQMD1.html
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Fri Nov 13, 2020 10:12 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3258
Location: London, ON Canada

Or you can go the opposite way, set CMQC.MQPMO_SET_ALL_CONTEXT for PMO options and then not set the putDateTime field of the MQMessage class.

Don't forget to set CMQC.MQOO_SET_ALL_CONTEXT for Open Options.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
mattfarney2
PostPosted: Fri Nov 13, 2020 10:45 am    Post subject: Reply with quote

Newbie

Joined: 12 Nov 2020
Posts: 2

Thanks for the suggestions.

MQPMO_NO_CONTEXT worked perfectly.

-mf
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Nov 13, 2020 1:01 pm    Post subject: Reply with quote

Poobah

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

MQPMO_SET_ALL requires put and setall permissions
MQPMO_NO_CONTEXT requires only put permission
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
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 » IBM MQ API Support » Empty putTime and putDate in Java
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.