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 IndexGeneral DiscussionDoes Define ql(QUEUE1) REPLACE clear the messages in a queue

Post new topicReply to topic
Does Define ql(QUEUE1) REPLACE clear the messages in a queue View previous topic :: View next topic
Author Message
cra1gl1
PostPosted: Wed May 02, 2018 4:40 pm Post subject: Does Define ql(QUEUE1) REPLACE clear the messages in a queue Reply with quote

Apprentice

Joined: 25 Apr 2018
Posts: 30

Hello,

Shouldn't the runmqsc command "DEFINE QL(QUEUE1) REPLACE" define a new queue called QUEUE1 and if there's already a QUEUE1, replace it?
I tried it by creating a queue, put some msgs in it with amqsput and then defining the same queue again with "REPLACE",. and I noticed that the queue still had the curdepth(> 0). Could someone tell if this how it works or if I'm missing something? Thanks.


Last edited by cra1gl1 on Wed May 02, 2018 5:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed May 02, 2018 4:52 pm Post subject: Reply with quote

Poobah

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

Everything in MQ is case-sensitive. So, 'QUEUE1' and 'queue1' are different queues. If you want to keep mixed case, make sure to surround the name with apostrophes. If you don't enclose in apostrophes, the name will be folded into UPPER-CASE.

DEFINE with REPLACE will Not delete messages
_________________
There are two types of people in this world:
1) Those that can extrapolate from incomplete data


Last edited by bruce2359 on Wed May 02, 2018 6:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
cra1gl1
PostPosted: Wed May 02, 2018 5:16 pm Post subject: Reply with quote

Apprentice

Joined: 25 Apr 2018
Posts: 30

I edited the first post. I did use upper case both the times. The queue name's QUEUE1.
Back to top
View user's profile Send private message
cra1gl1
PostPosted: Wed May 02, 2018 5:25 pm Post subject: Reply with quote

Apprentice

Joined: 25 Apr 2018
Posts: 30

bruce2359 wrote:

DEFINE with REPLACE will Not delete message[/b]s.


I tried this, but it didn't fail. Command ran successfully and I still see the messages.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed May 02, 2018 5:58 pm Post subject: Reply with quote

Poobah

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

The DEFINE REPLACE works to change/replace object attributes. It does NOT delete messages from queues.
_________________
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
bruce2359
PostPosted: Fri May 04, 2018 12:48 pm Post subject: Reply with quote

Poobah

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

The.MQSC CLEAR command will delete messages from a local queue.
_________________
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
exerk
PostPosted: Sat May 05, 2018 2:08 am Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 5961

bruce2359 wrote:
The.MQSC CLEAR command will delete messages from a local queue.

Caveat: Provided there are no open handles on it.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.

Back to top
View user's profile Send private message
bruce2359
PostPosted: Sat May 05, 2018 2:48 pm Post subject: Reply with quote

Poobah

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

Caviar: a delicacy consisting of salt-cured roe of the Acipenseridae family.
_________________
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
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral DiscussionDoes Define ql(QUEUE1) REPLACE clear the messages in a queue
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.