Skip to main content

IBM Websphere MQ Saveqmgr - Middleware News

Building saveqmgr
-------- --------

Sample makefiles are included:

makefile.linux-- for building an Linux version of the executable (add -m31 for 64 bit linux on zSeries, see makefile)
makefile.aix  -- for building an AIX version of the executable.
makefile.solaris -- for building a aSolaris version of the executable.
makefile.hp -- for building a HP/UX version of the executable.
makefile.windows   -- for building a Windows  version of the executable.
makefile.win64   -- for building a Windows 64-bit version of the executable.
makefile.hpnss - for building a Tandem NSK version of the executable.
makefile.compaqtru64unix - for building an Compaq Tru64 Unix version of the
                 executable (Thanks to Ralph Beckers for support)
Descrip.mms   -- for building an OpenVMS version of the executable using MMS.
Make_savqmgr.com -- for building an OpenVMS version of the executable without MMS.

makefile.os400 is no longer included in this package.  See the AS400READ.ME file in ms03_iseries.zip for details.

Edit the makefile for your platform (ie makefile.windows) and
ensure the variables point to the correct directories, etc.

On UNIX, issue: "make -f makefile.xxx", where xxx is the extension
for the platform you are compiling on.

To recompile on Windows or Win-64, issue: "nmake -f makefile.windows" or
"nmake -f makefile.win64"


Hints:
------

You can use the -c flag together with sed to customize your output file.
Suppose you want to delete all lines that contain the attribute NPMCLASS,
try running:

./saveqmgr.linux -c | sed 's/^ *NPMCLASS.*/* skipping npmclass/' > saveqmgr.tst

If you want to change all local queues to a maxdepth of 640000, try:

./saveqmgr.linux -c | sed 's/^ *MAXDEPTH.*/  MAXDEPTH(640000) +/' > saveqmgr.tst

You get the idea...

You can automate the savings of all your qmgrs on a machine with this (for linux):

dspmq | grep 'STATUS(Running)' | sed 's/QMNAME(\(.*\)) *STATUS.*/\1/' | xargs -i ./saveqmgr.linux -f {}.mqsc -m {}

With V6 of MQ, you can create a SERVICE object to automatically run saveqmgr when the qmgr itself starts:

DEFINE SERVICE ('Ms03') DESCR('Run saveqmgr when qmgr starts') STARTCMD('c:\ms03\saveqmgr.exe') +
       STARTARG('-m +QMNAME+ -f c:\temp\+QMNAME+.mqsc -o') STDOUT('c:\temp\ms03.stdout') +
       STDERR('c:\temp\ms03.stderr') CONTROL(STARTONLY) SERVTYPE(COMMAND) REPLACE

Here's a little script to delete all the queues that begin with AMQ (even the PERMDYN ones):

export QM=WBRK_QM
./saveqmgr.linux -m$QM -1 -p -c |  grep \(\'AMQ | gawk '{print "delete ql",$3}' | runmqsc $QM

A script to authorize "phred" to get from all non-SYSTEM queues:

./saveqmgr.linux -m$QM -1 -s -c | egrep '^DEFINE QLOCAL|QREMOTE|QMODEL|QALIAS' | awk '{print $3}' |  \
sed -e "s/('\(.*\)')/\1/" | xargs -i  -t setmqaut -m $QM -t q -p phred -n {} +get

If you use GNU diff with the '-F' option on saveqmgr, you can get good detail about changed objects from yesterday:

diff -c -F DEFINE /tmp/wschutz.yesterday /tmp/wschutz.today
MS03 is a command line program and can be invoked with a -? flag to display
which parameters it will accept:

./saveqmgr. -?

where  is a platform specific extension, ie .exe for windows,
.solaris for solaris, etc.

Usage is:
 --help | -h | -?  : gives help (this)
 --localQMgr | -m lqmgr : is the name of the local qmgr to connect (MQCONN)
 --remoteQmgr | -r rqmgr : is the name of the remote qmgr (XMITQ name)
 --outputFile | -f [file] : allows the output file to be named, 
    if -f is not specified, the output file defaults to SAVEQMGR.MQSC
    if -f is specified without a filename, it is named \"qmgrname\".MQSC.
 --outputFileNoHeader | -F [file] : behaves the same as -f except no header line is created in the output file
      (and CURDEPTH, ALTDATE and  ALTTIME are not reported)
 --replaceOutput | -o : specifies to replace (overwrite) the output file
    if the -o flag is not specified, then the default is to append if the file exists
    (on iSeries, *REPLACE,*APPEND must be specified after the -o flag)
 --stdout | -c : directs output to STDOUT and overrides use of -f flag
 --noSyncPoint | -np : forces all puts and gets to specify NO_SYNCPOINT
 --noSubscriptions | -ns : suppress creation of subscriptions
 --noSystemObjects | -s [list] : suppress creation of objects that begin with \"SYSTEM*\"
       list is a comma separated selection from 
            QMGR,QUEUE,NAMELIST,CHANNEL,PROCESS,AUTHINFO,LISTENER,SERVICE,TOPIC,SUB,NONE
       Specifying NONE is equivalent to specifying -s without any options and will override all other choices
       This is an inclusion list, System objects of the types listed *will* be reported in the output file.
 --qm : A shortcut option that is exactly equivlaent to --noSystemObjects QMGR.
       The ALTER QMGR command will be produced, all other system objects will be skipped.
 --resetChannels | -R [flags] : create RESET CHANNEL commands
    flags can be any combination of the follow to create RESET for that channel type:
    s (SENDER) v (SERVER) r (RECEIVER) q (REQUESTER) c (CLUSSDR) d (CLUSRCVR)
    the default is to create RESET commands for all the above channel types
 --permDyn | -p : Create 'local queue' definitions from PERMDYN queues.
 --ignoreErrors | -i : Ignore 'pcf' error codes 'damaged object' 'unknown object'.
    Sets RetCode to WARNING if this error encountered.
 --quiet | -q : Quiet mode, do not issue warning about unknown PCF attributes
 --oneLine | -1 : generate entire DEFINE command on one line (which does NOT include ALTDATE etc)
 --twoLines | -2 : on a 2nd line, generate the DEFINE as a comment (which DOES include ALTDATE etc)
 --saveSecurity | -z [file] : create 'security definitions (like amqoamd -s)' in file 'file'(only >=V6)
           if not specified, defaults to \"qmgrname\".AUT 
 --saveSecurityNoHeader | -Z [file]: same as -z only without the header line
 --commandServerQ | -cs [queue]: the name of the Command Server Input queue, defaults to SYSTEM.ADMIN.COMMAND.QUEUE
 --version | -v version : determines which version of MQSC to generate
      and can be '2','5','51','52','53','6', or '7'
    The default is to generate mqsc at the version of the connected queue manager
    See "Notes on the '-v' flag" in this document before using this flag. 

The Client version of this program supports these additional flags:

If either the -a or -x switch is used, then MQCONNX will be used for the client connection
 --hostname | -a host : is the address of the host for a client connection (default is "localhost")
 --channel | -x channel : is the SVRCONN name for a client connection (default is "SYSTEM.DEF.SVRCONN")
 --sslCipher | -C cipher spec : indicates to use an SSL cipher spec for this client connection
 --keyRepos | -k key repository : name of key respository directory if using SSL for client connection
 --channelExitX | -eX channel exit: X = 'y' for security, 's' for send, 'r' for receive
 --channelDataX | -dX channel exit data: X = 'y' for security, 's' for send, 'r' for receive.


Comments

adsrerrapop

Popular posts from this blog

IBM Websphere MQ interview Questions Part 5

MQ Series: - It is an IBM web sphere product which is evolved in 1990’s. MQ series does transportation from one point to other. It is an EAI tool (Middle ware) VERSIONS:-5.0, 5.1, 5.3, 6.0, 7.0(new version). The currently using version is 6.2 Note: – MQ series supports more than 35+ operating systems. It is platform Independent. For every OS we have different MQ series software’s. But the functionality of MQ series Default path for installing MQ series is:- C: programfiles\BM\clipse\SDK30 C: programfiles\IBM\WebsphereMQ After installation it will create a group and user. Some middleware technologies are Tibco, SAP XI. MQ series deals with two things, they are OBJECTS, SERVICES. In OBJECTS we have • QUEUES • CHANNELS • PROCESS • AUTHENTICATION • QUERY MANAGER. In SERVICES we have LISTENERS. Objects: – objects are used to handle the transactions with the help of services. QUEUE MANAGER maintains all the objects and services. QUEUE: – it is a database structure ...

IBM Websphere MQ Reason code list / mq reason codes / websphere mq error codes / mq error messages

Reason code list ================= The following is a list of reason codes, in numeric order, providing detailed information to help you understand them, including: * An explanation of the circumstances that have caused the code to be raised * The associated completion code * Suggested programmer actions in response to the code * 0 (0000) (RC0): MQRC_NONE * 900 (0384) (RC900): MQRC_APPL_FIRST * 999 (03E7) (RC999): MQRC_APPL_LAST * 2001 (07D1) (RC2001): MQRC_ALIAS_BASE_Q_TYPE_ERROR * 2002 (07D2) (RC2002): MQRC_ALREADY_CONNECTED * 2003 (07D3) (RC2003): MQRC_BACKED_OUT * 2004 (07D4) (RC2004): MQRC_BUFFER_ERROR * 2005 (07D5) (RC2005): MQRC_BUFFER_LENGTH_ERROR * 2006 (07D6) (RC2006): MQRC_CHAR_ATTR_LENGTH_ERROR * 2007 (07D7) (RC2007): MQRC_CHAR_ATTRS_ERROR * 2008 (07D8) (RC2008): MQRC_CHAR_ATTRS_TOO_SHORT * 2009 (07D9) (RC2009): MQRC_CONNECTION_BROKEN * 2010 (07DA) (RC2010): MQRC_DATA_LENGTH_ERROR * 2011 (07DB) (RC2011): MQRC_DYNAMIC_Q_NAME_ERROR * 2012 (07DC) (RC201...

Installing IBM Integration Bus on Linux - Middleware News

Before you begin Check the readme.html file for any updates to these installation instructions; see the product readmes web page. Check that you have enough memory and disk space; see IBM Integration Bus system requirements. Check that you have completed any prerequisite steps; see Preparing the system. If you are using Red Hat Linux 6.5 with WebKitGTK version webkitgtk.x86_64 1.2.6-5.el6, complete the steps in the following topic to work around problems with the Eclipse SWT browser: IBM Integration Toolkit on RedHat 6.5 crashes with "JVM terminated. Exit code=160" error. If you are using Red Hat Linux 6.x or 7.x, you might need the GTK2 32-bit drivers installed on Linux; for more information, see IBM Integration Toolkit on Linux becomes unresponsive after opening a DFDL or XSD file. If you are using Red Hat Linux 7.1, complete the steps in the following topic to work around problems with the Eclipse SWT browser: Internal web browser in IBM Integration Toolkit ...