|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
any python version of this ChompQ.pl : to delete from queue |
« View previous topic :: View next topic » |
Author |
Message
|
mlotfi |
Posted: Thu Dec 03, 2015 1:00 pm Post subject: any python version of this ChompQ.pl : to delete from queue |
|
|
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 |
|
 |
mqjeff |
Posted: Thu Dec 03, 2015 1:08 pm Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|