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 Java / JMS » pcf read all messages in a givven queue - put date/time

Post new topic  Reply to topic
 pcf read all messages in a givven queue - put date/time « View previous topic :: View next topic » 
Author Message
vasilev
PostPosted: Fri Oct 25, 2019 1:59 am    Post subject: pcf read all messages in a givven queue - put date/time Reply with quote

Acolyte

Joined: 31 Oct 2014
Posts: 58
Location: Germany

Hello dear colleagues,
I am trying to read all the messages in a queue and get only put date/time.
I cannot find similar info and that is why i am opening a post here.
Can you help me with this. Should i Inquire the queue status and make some loop or i have to specify different attributes.

or i need a jms client to read the messages?


thank you!
Back to top
View user's profile Send private message Visit poster's website
hughson
PostPosted: Fri Oct 25, 2019 2:33 pm    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
Location: Bay of Plenty, New Zealand

You cannot use the PCF interface to obtain the putdate and puttime fields of all the messages on a queue.

You must use the messaging API. You will likely want to have a loop to browse all the messages, and in it read the PutDate and PutTime fields from the MQMD.

You can use any language you want, Java or not Java, entirely up to your own skill set, that's the beauty of the MQ API.

It may be wise to step back for a moment and review whether or not the provided samples can give you what you need, or whether another already written program can give you what you need. You don't say why you need to obtain all the PutDates and Times so we can't guess.

Cheers,
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Fri Oct 25, 2019 2:47 pm    Post subject: Reply with quote

Jedi Knight

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

Years ago, IBM posted a Java sample equivalent of the C sample called "amqsbcg". You can find it here.

Just delete all of the MQMessage attributes you don't want then it will do exactly what you want.

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
vasilev
PostPosted: Fri Oct 25, 2019 11:01 pm    Post subject: Reply with quote

Acolyte

Joined: 31 Oct 2014
Posts: 58
Location: Germany

Thank you.
I thought the same but wanted to ask , because cannot find info for this.
I am using java, checking the code now.
Have a nice weekend
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Sat Oct 26, 2019 9:01 am    Post subject: Reply with quote

Jedi Knight

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

vasilev wrote:
I thought the same but wanted to ask , because cannot find info for this.

You are going about this backwards. If you want to be a top notch programmer then you need to change how you think.

Your new philosophy should be:
- First do reearch - in this day and age that means lots & lots of Google searches
- Read and reread what you find
- Search the MQ Knowledge Center for topics that you are having problems with
- Download sample code and test
- If/when you get stuck, post a question with code showing the problem

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
vasilev
PostPosted: Sat Oct 26, 2019 11:29 am    Post subject: Reply with quote

Acolyte

Joined: 31 Oct 2014
Posts: 58
Location: Germany

Thank you Roger.
I hope someday each of us to become top notch programmers

Cheers
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » pcf read all messages in a givven queue - put date/time
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.