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 Discussion » VIM macro for MQ Scripts

Post new topic  Reply to topic
 VIM macro for MQ Scripts « View previous topic :: View next topic » 
Author Message
jhidalgo
PostPosted: Thu Apr 02, 2009 2:19 pm    Post subject: VIM macro for MQ Scripts Reply with quote

Disciple

Joined: 26 Mar 2008
Posts: 161

Hi guys,

I use to dump the configuration of qmgrs as a backup mechanism, the problem I used to have was that most of the tools will create HUGE scripts with all the default properties in it.

Since I use VIM (even on windows) I wrote the following Macro so I "cleans" the scripts and let's me with only the lines I really need, reducing a lot the size of the backups.

here you have in case you find it useful, it maps to F7 just to make it easy to use, change it, modify it, ignore it as you want, no rights reserved !

Just include this code in your .vimrc or _vimrc

Code:

map <F7> : call CleanMQScript()<CR>

func! CleanMQScript()
   exec "g/DESCR(' ')/d"
   exec "g/PROCESS(' ')/d"
   exec "g/TRIGDATA(' ')/d"
   exec "g/INITQ(' ')/d"
   exec "g/BOQNAME(' ')/d"
   exec "g/CLUSTER(' ')/d"
   exec "g/CLUSNL(' ')/d"
   exec "g/^*/d"
   exec "g/.* SHARE/d"
   exec "g/.*(0)/d"
   exec "g/.*GET(ENABLED)/d"
   exec "g/.*PUT(ENABLED)/d"
   exec "g/DEFPSIST(NO)/d"
   exec "g/CLWLUSEQ(QMGR)/d"
   exec "g/SCOPE(QMGR)/d"
   exec "g/DEFSOPT(SHARED)/d"
   exec "g/MSGDLVSQ(PRIORITY)/d"
   exec "g/HARDENBO/d"
   exec "g/USAGE(NORMAL)/d"
   exec "g/NOTRIGGER/d"
   exec "g/TRIGTYPE(FIRST)/d"
   exec "g/TRIGDPTH(1)/d"
   exec "g/RETINTVL(999999999)/d"
   exec "g/QDEPTHHI(80)/d"
   exec "g/QDEPTHLO(20)/d"
   exec "g/QSVCINT(999999999)/d"
   exec "g/QSVCIEV(NONE)/d"
   exec "g/DISTL(NO)/d"
   exec "g/NPMCLASS(NORMAL)/d"
   exec "g/STATQ(QMGR)/d"
   exec "g/MONQ(QMGR)/d"
   exec "g/ACCTQ(QMGR)/d"
   exec "g/DEFBIND(OPEN)/d"
   exec "g/QDPMAXEV(ENABLED)/d"
   exec "g/QDPHIEV(ENABLED)/d"
   exec "g/QDPLOEV(DISABLED)/d"
   exec "g/MCAUSER(' ')/d"
   exec "g/MRDATA(' ')/d"
   exec "g/MREXIT(' ')/d"
   exec "g/HBINT(300)/d"
   exec "g/MSGDATA(' ')/d"
   exec "g/MSGEXIT(' ')/d"
   exec "g/NPMSPEED(FAST)/d"
   exec "g/RCVDATA(' ')/d"
   exec "g/RCVEXIT(' ')/d"
   exec "g/SCYDATA(' ')/d"
   exec "g/SCYEXIT(' ')/d"
   exec "g/SENDDATA(' ')/d"
   exec "g/SENDEXIT(' ')/d"
   exec "g/SEQWRAP(999999999)/d"
   exec "g/USERID(' ')/d"
   exec "g/SSLCIPH(' ')/d"
   exec "g/SSLPEER(' ')/d"
   exec "g/KAINT(AUTO)/d"
   exec "g/MONCHL(QMGR)/d"
   exec "g/STATCHL(QMGR)/d"
   exec "g/COMPMSG(NONE)/d"
   exec "g/COMPHDR(NONE)/d"
endfunc

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 Discussion » VIM macro for MQ Scripts
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.