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 » any python version of this ChompQ.pl : to delete from queue

Post new topic  Reply to topic
 any python version of this ChompQ.pl : to delete from queue « View previous topic :: View next topic » 
Author Message
mlotfi
PostPosted: Thu Dec 03, 2015 1:00 pm    Post subject: any python version of this ChompQ.pl : to delete from queue Reply with quote

Acolyte

Joined: 07 Jul 2015
Posts: 60

Hi,

This article :

http://www.ibm.com/developerworks/websphere/techjournal/1103_mismes/1103_mismes.html

has a perl program that delete messages from queue following a formula :

Code:

# ChompQ.pl
#
# Script parses a WMQ TMC2 tigger message to extract the queue name,
# inquires on the MAXDEPTH of the queue, and then proceeds to delete
# CURDEPTH - (MAXDEPTH * QDEPTHHI) messages from the queue.  It then
# sets triggering back on.  If it happens that the CURDEPTH does not
# exceed QDEPTHHI * MAXDEPTH then just delete 1 message (so we do not
# get into a loop).
#
# Intended usage is to set TRIGDEPTH to 80% then delete down to 70%.
#
# NOTE: runmqsc and q MUST be in $PATH!!


I just started coding with python, this article is exactly what I am looking for, is there any way to convert it in python or if this is already done , thanks, your help is aprreciated.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Dec 03, 2015 1:08 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If you've only started working with python, and you don't know how to read perl, you're probably going to struggle a bit.

But yes, you can recode the perl into python that does the same thing.

Take it step by step.
_________________
chmod -R ugo-wx /
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 » General IBM MQ Support » any python version of this ChompQ.pl : to delete from 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.