Friday 19 April 2019

English Examination


  • Spurned  - Refuse , Reject 
  • Apostles - Disciple
  • Resurrection - Restoration to life , Raising from the dead
  • Stubborn      -  Stubborn person is determined to do what he want , Things that are stubborn are difficult.
  • Arouse         - Wakeup , Rouse, Awaken, Wake 
      •   Ex: She has been aroused  from the telephon
  • Envy  - Jewlousy
  • Strife - Disagreement, Arguments, Controversy
      • Ex : Strife within the community
  • Rebellion - Revoluation
  • Slew        -  Turn on slie Violently and Uncontrolle
  • Tyrants    - A cruel Rular
  • Condemn - Rebuke , Criticize
  • Procurator - Law , A treasury officer in a province of the Roman empier
  • Flee          -  Flee in the Country means Run Away
  • Siege       -  

Wednesday 13 August 2014

Fundamentals of Websphere MQ Series

Agenda
 Websphere MQ Introduction
 Websphere MQ Objects
 Websphere MQ Administration Basics
 Hands-on part 1
 Distributed MQ
 Websphere MQ Clusters
 Hands-on part 2
 Websphere MQ Programming Basics
 Hands-on part 3

Messaging and Queuing
 Messaging is
 an availability adaptation technique used for the transfer
of information between two entities without regard for
the immediate availability and accessibility of either
 Queuing
 a time adaptation technique user for saving information
until the intended message receiver is ready to receive it
Messaging and queuing is both asynchronous and
connection less
Note: entities can be program, persons, systems etc

Requirements
 Distributed applications and systems
 Increase in program to program communication
 Heterogeneous Platforms
 Multiple communication protocols
 Maximize resource utilization
 Development complexity and resource skill set

MQ Objects

MQ Message
 String of bytes meaningful to the entity using it.
 Two parts to MQ messages
 Application Data
 Content and structure defined and understood by the
application program
 Message Descriptor
 Contains control information like type of message and
priority which are understood and used by MQ
 Default length is 4 MB; the max length is 100 MB
 Length can be restricted by the definition of MQ
objects and the system storage

 Messages can be segmented or grouped

MQ Messages
 Message Types (Functional)
 Datagram
 Request
 Reply
 Report
 Message Retention Types
 Persistent
 Non-persistent

MQ Message Descriptor
 Version
 Message ID/Correlation ID
 Persistent/Non persistent
 Priority
 Date and time
 Life time of a message
 Coded Character Set Id
 Format
 Sender application and type
 Report options/Feedback
 Back out counter
 Segmentation/Grouping information

MQ Object Names
 Up to 48 characters for all objects except channels
 Up to 20 characters for channels
 Uppercase A- Z
 Lowercase a - z
 Numerics 0 - 9
 Period (.)
 Underscore (_)
 Forward slash (/)*
 Percent sign (%)*
 Blanks are not allowed

Managing MQ Objects
 Control commands typed in through key board.
 MQSC commands through key board or from files
 Programmable Command Format (PCF) Messages
 MQ Administration Interface (MQAI) call from a
program
 MQ Explorer snap-in and MQ services snap-in
running under Microsoft management Console*

Message Queue Manager (MQM)
 Manages queues of messages for applications
 Provides application programming interface MQI
 Uses existing network facilities to transfer
messages
 Coordinates database and queue data updates
 Segments messages and assembles them
 Allows message grouping and disassembling
 Can send message to more than one destination
 Provides administrative functions on objects
 Special events like triggers and instrumentation
events are generated

MQ Queues
For Applications
 Local Queues
 Remote Queues
 Alias Queues
 Model Queues
 Dynamic Queues
Used by MQ
 Initiation Queues
 Transmission Queues
 Cluster Transmission Queues
 Dead-letter Queues
 Command Queues
 Reply-to queues
 Event Queues

Process definition
 Defines an application that starts in response to a trigger
 Attributes include application type, application ID (path) and data specific to the application

Channels
 Logical communication link
 Communication path from one MQM to another
 Used to move messages between MQMs
 Shields applications from underlying protocols
 Message Channels connects two MQMs
 Uses Message Channel Agents (MCA)
 Unidirectional
 Requires a sender, receiver channels and a protocol
 MQI Channels connects MQ client to server
 Bidirectional
 Used for MQ calls and responses only

Namelist
 Contains a list of MQ objects; queue, cluster,authinfo
 Typically used by trigger monitors to identify a group of queues
 Used in clustered environment to inform the availability of an MQ object to clusters
 Maintained independent of application and can be modified without stopping it
 Multiple applications can use a Namelist

Basic Administration*
 Define MQ Objects
 Display MQ Objects
 Alter MQ Objects
 Delete MQ Objects
 Miscellaneous

MQM Administration
Create MQ Manager
CRTMQM
e.g. CRTMQM /q TESTQMGR
/q – sets the MQM as default
Start MQ Manager
STRMQM
e.g. STRMQM TESTQMGR
Stop MQ Manager
ENDMQM
e.g. ENDMQM TESTQMGR
Delete MQ Manager
DLTMQM
e.g. ENDMQM TESTQMGR
bijugs@acm.

Stop MQ Manager ENDMQM Options
 By default MQM is quiesced and so takes time
 -c to notifies all applications to stop but doesn't wait for MQM to end
 -c is same as issuing ENDMQM with no options
 -w waits until apps stop and MQM ends
 -i immediate and doesn't wait for apps to disconnect
 -p pre-emptive and should be used with caution

Managing Queues
 Create a local queue
 DEFINE QLOCAL(TEST.LOCAL.QUEUE)
 Display a local queue
 DISPLAY QLOCAL(TEST.LOCAL.QUEUE)
 Alter a local queue
 ALTER QLOCAL(TEST.LOCAL.QUEUE) + GET (DISABLED)
 Delete a local queue
 DELETE QLOCAL(TEST.LOCAL.QUEUE) PURGE

Managing Trigger Processes
 Create a Process
 DEFINE PROCESS(PROC1) REPLACE + DESCR('test proc') APPLTYPE(WINDOWS)+ APPLICID('c:\test\prog.exe')
 Display a Process
 DISPLAY PROCESS(PROC1)
 Alter a Process
 ALTER PROCESS(PROC1)USERDATA('12')
 Delete a Process
 DELETE PROCESS(PROC1)

Enabling Triggers
 Enabling trigger in a queue
 DEFINE QLOCAL(TEST.LOCAL.QUEUE)REPLACE +
TRIGGER TRIGTYPE(first)PROCESS(PROC1)+
INITQ(SYSTEM.DEFAULT.INITIATION.QUEUE)
 Trigger Types
 every
 first
 N messages

Managing Channels
 Create a Channel
 DEFINE CHANNEL(MQMA.MQMB)CHLTYPE(sdr)+
XMITQ(MQMB) TRPTYPE(tcp)+
CONNAME(SERVER1.XYZ.COM)
 Display a Channel
 DISPLAY CHANNEL(MQMA.MQMB)
 Alter a Channel
 ALTER CHANNEL(MQMA.MQMB)+ CONNAME
(SERVER2.XYZ.COM)
 Delete a Channel
 DELETE CHANNEL(MQMA.MQMB)
bijugs@acm.

Enabling Triggers
 Enabling trigger in a queue
 DEFINE QLOCAL(TEST.LOCAL.QUEUE)REPLACE +
TRIGGER TRIGTYPE(first)PROCESS(PROC1)+
INITQ(SYSTEM.DEFAULT.INITIATION.QUEUE)
 Trigger Types
 every
 first
 N messages

Managing Channels
 Create a Channel
 DEFINE CHANNEL(MQMA.MQMB)CHLTYPE(sdr)+
XMITQ(MQMB) TRPTYPE(tcp)+
CONNAME(SERVER1.XYZ.COM)
 Display a Channel
 DISPLAY CHANNEL(MQMA.MQMB)
 Alter a Channel
 ALTER CHANNEL(MQMA.MQMB)+ CONNAME
(SERVER2.XYZ.COM)
 Delete a Channel
 DELETE CHANNEL(MQMA.MQMB)

Managing Namelist
 Create a Namelist
 DEFINE NAMELIST(CLUSTERNL)+
NAMES(CLUSA,CLUSB)+
NLTYPE(CLUSTER)REPLACE
 Display a Namelist
 DISPLAY NAMELIST(CLUSTERNL)
 Alter a Namelist
 DEFINE NAMELIST(CLUSTERNL)+
NAMES(CLUSA,CLUSB,CLUSC)+
NLTYPE(CLUSTER)
 Delete a Namelist
 DELETE NAMELIST(CLUSTERNL)

Hands-on Part 1 MQ Administration

Distributed MQ
 Transferring messages between Queue Managers
 Queue Managers can be on the same machine or world apart
 Queue Managers can be on the same platform or hetrogenous platforms
 Implemented using Distributed Queue Management (DQM) features of MQ including MQ Clusters

Distributed MQ Components
 Local and remote Queue Managers and queues
 Local is one to which an application is connected
 Remote queue definition
 Local definition of a queue in a remote MQM
 Transmission Queues
 Special local queue to store message temporarily before transmitting to remote destination
 Message channel agents (MCA)
 Software that handles sending and receiving
 Channels
 One way communication link between MQMs Dead letter queue
 Special queue to store undelivered messages
 Transport Service
 Communication protocol independent of MQ
 MQ supports multiple protocols
 Platform dependent
 Channel Initiators and Listeners
 Initiators are trigger monitors for sender channels
 Listeners start receiver channels on receiving request from the sender MCA
 Channel Exit Programs
 Used for additional processing like encryption
Local and remote Queue Managers and queues
 Local is one to which an application is connected
 Remote queue definition
 Local definition of a queue in a remote MQM
 Transmission Queues
 Special local queue to store message temporarily before transmitting to remote destination
 Message channel agents (MCA)
 Software that handles sending and receiving  Channels
 One way communication link between MQMs bijugs@acm.

Dead letter queue
 Special queue to store undelivered messages
Transport Service
 Communication protocol independent of MQ
 MQ supports multiple protocols
 Platform dependent
Channel Initiators and Listeners
 Initiators are trigger monitors for sender channels
 Listeners start receiver channels on receiving request from the sender MCA
Channel Exit Programs
 Used for additional processing like encryption

Channel Types & Combinations
Channel Types
 Sender
 Receiver
 Server
 Requester
 Cluster Sender
 Cluster Receiver
Valid Combinations
 Sender - Receiver
 Requester - Server
 Requester - Sender
 Server - Receiver
 Cluster Sender – Cluster Receiver bijugs@acm.

Queue Addressing & Aliases
 Queue Name + Queue Manager Name + Transmission Queue (if remote queue)
Remote Queue Definition
 Resolves the remote queue location
Queue Manager Alias Definition
 Specifies alternative names for the message
descriptor of a “send” message
Reply-to Queue Alias Definition
 Specifies alternative names for the reply
information in the message descriptor
Aliases are characterized by a blank RNAME in the remote queue definition

Remote Queue Definition
- Define QREMOTE(Q1)RNAME(Q1)+ RQMNAME
(QMB)XMITQ(QMB)
 Resolves the remote queue address using the remote queue manager, remote queue name and the
transmission queue
 If the transmission queue is not specified, a transmission queue with the name of the remote
queue manager will be used
 If not available, the default transmission queue of the queue manager will be used

Queue Manager Alias
 Queue Manager Alias
- Define QREMOTE(QMB_Test)RNAME()+
RQMNAME(QMB)
- Define QREMOTE(QMB_Test)RNAME()+
RQMNAME(QMB)XMITQ(QMC)
 Messages with MQM QMB_Test in the descriptor will be modified to QMB before being forwarded
 XMITQ parameter can be used to steer the message to use a specified channel
 If transmission queue is not specified, the logic detailed in the previous slide will be used

Reply-to Queue Alias
 Can be used to alter the reply-to queue and queue manager without changing the application
 At the sender queue manager
- Define QREMOTE(QMA_Reply) + RNAME
(Answer_QMA)RQMNAME(QMA_Return)
- Define QREMOTE(QMA_Return)RNAME()+
RQMNAME(QMA)
 In “PUT” call leave the “reply to queue manager” blank and set the queue name to QMA_Reply
 At the replying queue manager - Define QLOCAL(QMA_Return)USAGE(XMITQ)

Reaching Remote Queue Managers
 Point to point
 Multi-hopping
 Using shared channels
 Using multiple channels
 Using MQ clusters

DMQ Commands
Start Channel Initiators
 RUNMQCHI -q IQ (Control Command)
 START CHINIT INITQ(IQ) (MQSC Command)
Stopping Channel Initiators
 Alter the init queue to disable GET from queue
 Start MQM Listeners
 RUNMQLSR -t TCP -m MQM-p 1414 (control Command)*
 START LISTENER IPADDR(X.X.X.X) PORT(nnnn)
TRPTYPE(tcp) (MQSC Command)
*-This requires editing of /etc/services and /etc/inetd.conf files to add
MQSeries 1414/tcp #MQ Listener
MQSeries stream tcp nowait mqm /usr/mqm/bin/amqcrsta -q mqm.name

Stop MQM Listeners
 ENDMQLSR -m MQM (control Command)
 STOP LISTENER IPADDR(X.X.X.X) PORT(nnnn)
TRPTYPE(tcp) (MQSC Command)
Start MQ Channel
 RUNMQCHL -c CHANNEL -m QM (Control Command)
 START CHANNEL(channel-name) (MQSC Command)
Stop MQ Channel
 STOP CHANNEL(channel-name) (MQSC Command)
Display MQ Channel Status
 DISPLAY CHSTATUS(channel-name) (MQSC Command)

To test a channel
 PING CHANNEL(channel-name) (MQSC Command)


WebSphere MQ Queue Load / Unload Utility


 MO03: WebSphere MQ Queue Load / Unload Utility User Guide Version 1.0
WebSphere MQ Queue Load / Unload Utility
Contents
NOTICES...........................................................................................................................................................III
CONTENTS........................................................................................................................................................IV
TABLES...............................................................................................................................................................V
PREFACE...........................................................................................................................................................VI
CHAPTER 1. WEBSPHERE MQ QUEUE LOAD / UNLOAD UTILITY..............................................1
OVERVIEW..........................................................................................................................................................1
INSTALLATION.....................................................................................................................................................1
Windows DIRECTORY...................................................................................................................................1
AIX DIRECTORY...........................................................................................................................................1
Solaris DIRECTORY......................................................................................................................................1
HP DIRECTORY............................................................................................................................................1
Linux DIRECTORY.........................................................................................................................................1
CHAPTER 2. GETTING STARTED..........................................................................................................2
EXAMPLE 1. UNLOAD A QUEUE TO A FILE...........................................................................................................2
EXAMPLE 2. LOAD A QUEUE FROM A FILE...........................................................................................................2
EXAMPLE 3. COPY THE MESSAGES FROM ONE QUEUE TO ANOTHER QUEUE........................................................2
EXAMPLE 4. MOVE THE MESSAGES FROM ONE QUEUE TO ANOTHER QUEUE.......................................................2
EXAMPLE 5. WORK WITH THE FILE OF MESSAGES................................................................................................2
CHAPTER 3. PARAMETERS....................................................................................................................3
CONNECTION METHODS......................................................................................................................................3
FILE USE.............................................................................................................................................................3
QUEUE ACCESS OPTIONS......................................................................................................................................3
CONTEXT OPTIONS..............................................................................................................................................4
DISPLAY OPTIONS...............................................................................................................................................4
Combination of Hex and ASCII data..............................................................................................................4
Interleaved Hex and ASCII data.....................................................................................................................5
Message Index................................................................................................................................................5
SUMMARY DATA.................................................................................................................................................5
MESSAGE SELECTION..........................................................................................................................................6
Message Range...............................................................................................................................................6
Search String..................................................................................................................................................6
CHAPTER 4. FILE FORMAT....................................................................................................................8
EXAMPLE - CHANGING THE USER ID...................................................................................................................8
ATTRIBUTE FORMAT REFERENCE........................................................................................................................8
RECOGNISED FILE FORMATS................................................................................................................................9 iv
WebSphere MQ Queue Load / Unload Utility
Tables
Table 1: Context options use by QLOAD................................................................................................4
Table 2: Message range options used by QLOAD.................................................................................6
Table 3: Search string options used by QLOAD.....................................................................................7
Table 4: Meaning of column one symbol in file format...........................................................................8
Table 5: Message descriptor attribute representations...........................................................................9 v
WebSphere MQ Queue Load / Unload Utility
Preface
Ever since I released my MA01 (Q Utility) SupportPac I have had periodic requests to explain how it can be used to unload, and subsequently reload, messages from a queue. The answer has always been that this is not what MA01 is for and that surely there must be a utility available. Well, after sufficient numbers of these requests I looked for a utility myself and didn’t really find anything which fitted the bill. What was needed was a very simple, some would say unsophisticated, program which unloaded a queue into a text file. The notion of a text file was important because a number of users wanted the ability to change the file once it had been created. I also find that text based files are more portable and so this seemed useful if we want to unload a queue, say on Windows, and then load the messages again on a Solaris machine. The disadvantage of this approach is that the file is larger than it would be in binary mode. Storing data using the hex representation of the character rather than the character itself essentially uses twice as much space. However, in general I do not envisage people using this program to unload vast amounts of message data but a few test messages or a few rogue messages on the dead letter queue which are then changed and reloaded elsewhere.
I would like to thank Morag Hughson for writing this user guide and for testing the described functionality. Writing the code is the fun bit and without her offering to do the leg work I doubt whether this SupportPac would have ever seen the light of day.
I hope you find this program useful. As always I welcome your comments, both good and bad. Please feel free to e-mail me with any bug reports or suggestions. vi
WebSphere MQ Queue Load / Unload Utility WebSphere MQ Queue Load / Unload Utility

Chapter 1.

This document describes the functions available in the SupportPac.
Overview

The WebSphere MQ Queue Load / Unload Utility allows the user to copy or move the contents of a queue, its messages, to a file. This file can be saved away as required and used at some later point to reload the messages back onto the queue. This file has a specific format understood by the utility, but is human-readable, so that it can be updated in an editor before being reloaded. Care should be taken not to change the format when editing fields within it. The utility will only reload a file with the correct format.
Installation
The following platforms are supplied in the zip file MO03.zip:
• Windows
• AIX
• Solaris
• HP
• Linux

Download this file (in BINARY) to a temporary directory and unzip with the option to ensure the subdirectories stored in the ZIP file are re-created). This will create subdirectories containing the following:
Windows DIRECTORY
qload.exe - will run as a client or a Queue Manager program (see -l parameter).

AIX DIRECTORY
qload - runs as a Queue Manager program
• qloadc - runs as a client program

Solaris DIRECTORY
qload - runs as a Queue Manager program
• qloadc - runs as a client program

HP DIRECTORY
qload - runs as a Queue Manager program
• qloadc - runs as a client program

Linux DIRECTORY
qload - runs as a Queue Manager program
• qloadc - runs as a client program

Once unzipped, transfer the appropriate executable, again in binary, to the destination system.
1
WebSphere MQ Queue Load / Unload Utility

Chapter 2. Getting Started

The WebSphere MQ Queue Load / Unload Utility can be useful for a number of tasks. These are detailed below as simple examples. All of these examples can be modified with the use of a number of other parameters which are documented in “Chapter 3. Parameters” on page 3.
Example 1. Unload a Queue to a File Example 1. Unload a Queue to a File

To save the messages that are on a queue, to a file, perhaps for archiving purposes and the possibility of later reload back onto a queue; use the following options on the command line.
qload –m QM1 –i Q1 –f c:\myfile
This takes a copy of the messages from the queue and saves them in the file specified. The format of this file is described in “Chapter 4. ” on page 8.
Example 2. Load a Queue from a File

To reload a queue with the messages you saved in “Example 1. Unload a Queue to a File”, use the following options on the command line. Note that the file passed to WebSphere MQ Queue Load / Unload Utility must be a recognised format. The recognised formats are listed in “” on page 9.
qload –m QM1 –o Q1 –f c:\myfile
Example 3. Copy the messages from one Queue to another Queue

The file parameter in “Example 1. Unload a Queue to a File” could be replaced with another queue name instead, allowing the messages from one queue to be copied to another queue, using the following options on the command line.
qload –m QM1 –i Q1 –o Q2
Example 4. Move the messages from one Queue to another Queue

A variation on “Example 3. Copy the messages from one Queue to another Queue” would be to move the messages instead of copying them. This illustrates the distinction between using –i (lower case) which only browses a queue, and –I (upper case) which destructively gets from a queue. Use the following options on the command line.
qload –m QM1 –I Q1 –o Q2
Example 5. Work with the file of messages

Having unloaded the message from your queue, as in “”, you may want to edit the file. You may also want to change the format of the file to use one of the display options that you did not specify at the time you unloaded the queue. You can use the WebSphere MQ Queue Load / Unload Utility to reprocess the file into the desired format even after the unload of the queue has taken place. Use the following options on the command line.
qload –f c:\oldfile –f c:\newfile -dA
File Format

Recognised file formats

2
WebSphere MQ Queue Load / Unload Utility

Getting StartedGetting Started

Chapter 3. Parameters

There are a number of switch parameters that can be passed to WebSphere MQ Queue Load / Unload Utility to control the behaviour you need. These are detailed in this chapter.
Connection Methods

You have two connection methods available to you with the WebSphere MQ Queue Load / Unload Utility. You can either connect directly to a local queue manager, or connect using a client connection. The default behaviour is to connect directly to the queue manager. If you have a default queue manager you can omit the –m switch which provides the queue manager name. To connect to the Queue Manager via a client, using the client channel table or the environment variable MQSERVER, use the following options on the command line.
mqsc –m QM1 –l mqic32
File Use

As already seen in “Chapter 2. ” on page 2, the –f flag is used to indicate the file name. This file may already exist in which case the program will ask whether you wish to overwrite it or not. If you select not to overwrite the file, no messages will be unloaded and the utility will end. You can select to overwrite the file when asked this question, or you can specify that the file to be used should be overwritten if it exists by using the –F (upper case) option as shown, on the command line.
qload –m QM1 –i Q1 –F c:\myfile
If you wish to combine the messages from two queues into one file, you can use your operating system services to concatenate the two files together and the format will still be acceptable to WebSphere MQ Queue Load / Unload Utility.
You can also use the –f flag to specify stdout as the output source instead of a file name. This may be useful if you simply wish to display the messages on the queue to the screen, or pipe the output another program.
Queue access options

As already seen in “Chapter 2. ” on page 2, the –o flag is used to indicate the output queue, that is the queue to which messages are put; the –i and –I flags are used to indicate the input queue, that is the queue from which messages are browsed or destructively got.
If the messages on the queue being unloaded need to be converted, the –c flag should be used to cause the MQGET call from the input queue to specify GMO_CONVERT with the CCSID and Encoding values specified. The encoding value should be specified in hex. Use the following options on the command line.
qload –m QM1 –i Q1 –f c:\myfile –c 850:X’222’
If all that is required is to use the local code page and native encoding then simply use the following options on the command line.
qload –m QM1 –i Q1 –f c:\myfile –c 0
3
WebSphere MQ Queue Load / Unload Utility

File Format

Context Options

There are two sets of context information in the Message Descriptor (MQMD), the identity context fields and the origin context fields. These are described in the WebSphere MQ Application Programming Guide. The default action of the WebSphere MQ Queue Load / Unload Utility is to set all the context information in the MQMD to that which was saved in the file being loaded. This requires the user ID under which the utility is running to have appropriate authority to set all the context fields.
The context fields can be manipulated in other ways using the various other options with the –C flag. “” details the options that can be used. The main difference to note is that the first two options are applicable when loading from a file, and the second two options are applicable when loading one queue from another queue. Option
Meaning
A
Set all the context fields in the MQMD to that which was saved in the file.
I
Set only the identity context fields in the MQMD to that which was saved in the file.
A
Pass all the context fields in the MQMD from the messages on the input queue to the messages on the output queue.
I
Pass only the identity context fields in the MQMD from the messages on the input queue to the messages on the output queue.
d
Context fields in the MQMD of messages on the output queue will represent the WebSphere MQ Queue Load / Unload Utility.
n
There will be no information in the Context fields in the MQMD of messages on the output queue.


Monday 11 August 2014

Message Broker Commands


  • Create BROKER_CONFIG_DB manually

             
mqsicreatedb <DBNAME> -i <USERNAME> -a <PASSWORD>
crtmqm -q <QUEUE_MGR_NAME>






         
strmqm <QUEUE_MGR_NAME>  
mqsicreateconfigmgr <CONFIG_MGR_NAME> -i <USERNAME> -a <PASSWORD> -q <QUEUE_MGR_NAME>
mqsicreatebroker <BROKER_NAME> -i <USERNAME> -a <PASSWORD> -q <QUEUE_MGR_NAME> -n <DBNAME>  
       
mqsicreatedb NDB -i patiln2 -a Sep@2012  
crtmqm -q NQMGR -p 
strmqm N_QUEUEMGR  
       
mqsicreateconfigmgr N_CONFIG_MGR -i patiln2 -a Sep@2012 -q N_QUEUEMGR  
mqsicreatebroker N_BROKER -i patiln2 -a Sep@2012 -q N_QUEUEMGR -n NDB


       
mqsistart N_BROKER -e TEST
                   
mqsilist WBRK61_DEFAULT_BROKER
                   
  • Change Debug Port for an Execution Group
mqsichangeproperties WBRK61_DEFAULT_BROKER -e Airline -o ComIbmJVMManager -n jvmDebugPort -v 6868
  • View Debug port for an Execution Group
mqsireportproperties WBRK61_DEFAULT_BROKER -e Airline -o ComIbmJVMManager -n jvmDebugPort
mqsireportproperties <<BrokerName>> -e <<ExecutionGroup>> -o ComIbmJVMManager -n jvmMaxHeapSize
mqsireportproperties <<BrokerName>> -e <<ExecutionGroup>> -o ComIbmJVMManager -n jvmMinHeapSize
mqsistop WBRK61_DEFAULT_CONFIGURATION_MANAGER
mqsisetdbparms MB7BROKER -n dsn::DSN -u UserId1 -p password1
mqsisetdbparms WBRK61_DEFAULT_BROKER -n RESERVEDB -u patiln2 -p Swarali@003
  • mqsideploy commands:
  • To cancel all outstanding deployments on the Broker:
mqsideploy -n <<PathToConfigMgrFileInDblQuotes>> -c -b <<BrokerName>> -w <<TimeOutValueInSeconds>>
  • To undeploy any deployed resource from an Execution Group::
mqsideploy -n <<PathToConfigMgrFileInDblQuotes>> -b <<BrokerName>> -e <<ExecutionGroup>> -d <<ResourceName>> -w <<TimeOutValueInSeconds>>
  • To deploy a BAR File onto an Execution Group:
mqsideploy -n <<PathToConfigMgrFileInDblQuotes>> -b <<BrokerName>> -e <<ExecutionGroup>> -a <<PathToBarFile>> -w <<TimeOutValueInSeconds>>
mqsideploy -n "C:\Reservation\LocalProject\LocalDomain.configmgr" -b WBRK61_DEFAULT_BROKER  -e default -a "C:\Reservation\Database\Database.bar" -w 60
mqsisetdbparms MB7BROKER -n dsn::DSN -u UserId1 -p password1
mqsisetdbparms WBRK61_DEFAULT_BROKER -n RESERVEDB -u patiln2 -p Swarali@003
  • Check Queue Manager Listener Status 
runmqlsr -m WBRK61_DEFAULT_QUEUE_MANAGER -t tcp
mqsireportproperties WBRK61_DEFAULT_BROKER -e default -o ComIbmJVMManager -n jvmDebugPort
---------------------------------------------------------------------------------------------------------------------------------------------------
Queue Manager Commands (For running these commands, the IBM MQ Series Service should be up & running)
---------------------------------------------------------------------------------------------------------------------------------------------------
  • Create a Queue Manager:
               
crtmqm QUEUE_MANAGER_NAME
  • Create a Queue Manager as default:
               
crtmqm QUEUE_MANAGER_NAME -q
  • Start a Queue Manager:
               
strmqm QUEUE_MANAGER_NAME
  • Stop a Queue Manager:
               
endmqm QUEUE_MANAGER_NAME
  • To view the list of local queues created under a Queue Manager:
               
runmqsc QUEUE_MANAGER_NAME -> Press ENTER
dis qlocal(*)
end
[As an alternative to 'dis', 'display' or 'dsp' can also be used. 'end' is used to exit performing any operations on the QUEUE_MANAGER_NAME]
  • To create a Local Queue under a Queue Manager:
               
runmqsc QUEUE_MANAGER_NAME -> Press ENTER
DEFINE QLOCAL(QUEUE_NAME)
end
[This will create a local queue with default properties. If the queue has to be created with custom properties, it can be done by adding it at the end of the line by separating each by a Whitespace.
e.g.: DEFINE QLOCAL(QUEUE_NAME) MAXDEPTH(1000000)
  • To create a Server Connection Channel for a Queue Manager:
               
runmqsc QUEUE_MANAGER_NAME -> Press ENTER
DEFINE CHANNEL(CHANNEL_NAME) CHLTYPE (SVRCONN) TRPTYPE (TCP)
  • To create a Listener for a Queue Manager:
               
runmqsc QUEUE_MANAGER_NAME -> Press ENTER
DEFINE LISTENER(LISTENER_NAME) TRPTYPE (TCP) CONTROL (QUEUE_MANAGER_NAME) PORT (PORT_NO)
  • To start a Listener for a Queue Manager:
               
runmqsc QUEUE_MANAGER_NAME -> Press ENTER
START LISTENER(LISTENER_NAME)
  • To put a message onto a Queue:
               
In AIX,
amqsput QUEUE_NAME QUEUE_MANAGER_NAME -> Press ENTER
Paste or Type the message and press ENTER. Each line (after pressing ENTER) when typed constitutes one message. However, each pasted text is treated as one message when ENTER command is given.
end
[Press ENTER key twice or type end and then press ENTER key to exit the MQ Script Command]
In WINDOWS,
runmqsc QUEUE_MANAGER_NAME -> Press ENTER
amqsput QUEUE_NAME -> Press ENTER
Paste or Type the message and press ENTER. Each line (after pressing ENTER) when typed constitutes one message. However, each pasted text is treated as one message when ENTER command is given.
end
[Press ENTER key twice or type end and then press ENTER key to exit the MQ Script Command]
---------------------------------------------------------------------------------------------------------------------------------------------------
___________________________________________________________________________________________________________________________________________________
___________________________________________________________________________________________________________________________________________________
WebSphere Message Broker Commands (For running these commands, the IBM MQ Series Service should be up & running)          
---------------------------------------------------------------------------------------------------------------------------------------------------
  • To view the Components (Broker, Configuration Manager & Queue Manager associated with the Broker) created:
mqsilist
  • To view the Execution Groups created under a particular Broker: (The 4-digit number displayed against each Execution Group is the Process ID of the Process DataFlowEngine.exe which corresponds to an Execution Group)
mqsilist BROKER_NAME
  • To view the Flows & Resources (Jars, Message Dictionaries, Message Maps etc) deployed onto a Broker's Execution Group:
mqsilist BROKER_NAME -e EXECUTION_GROUP_NAME
  • To view the Broker's EG Properties:
mqsireportproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ObjectName -n PropertyName
___________________________________________________________________________________________________________________________________________________
  • To view all the properties of a Broker's EG ('-r' indicates recursive fetch, use '-a' for non-recursive fetch):
           
mqsireportproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o AllReportableEntityNames -r
  • To view all the Configurable properties of a Broker ('-r' indicates recursive fetch, use '-a' for non-recursive fetch):
         
mqsireportproperties BROKER_NAME -c AllTypes -o AllReportableEntityNames -r
  • To view the Max Heap Size set to a Broker's EG:
               
mqsireportproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ComIbmJVMManager -n jvmMaxHeapSize
  • To view the Min Heap Size set to a Broker's EG:
               
mqsireportproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ComIbmJVMManager -n jvmMinHeapSize
  • To view the Debug Port set to a Broker's EG:
               
mqsireportproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ComIbmJVMManager -n jvmDebugPort
___________________________________________________________________________________________________________________________________________________
  • To change the Broker's EG Properties:
               
mqsichangeproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ObjectName -n PropertyName -v ValueToBeSet
  • To change any of the Configurable properties of a Broker ('-r' indicates recursive fetch, use '-a' for non-recursive fetch):
         
mqsichangeproperties BROKER_NAME -c ConfigurablePropertyName -o ObjectName -v NewValue
  • To change the Max Heap Size set to a Broker's EG: [-v parameter should be a value in Bytes]
             
mqsichangeproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ComIbmJVMManager -n jvmMaxHeapSize -v NewValue
  • To change the Min Heap Size set to a Broker's EG: [-v parameter should be a value in Bytes]
             
mqsichangeproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ComIbmJVMManager -n jvmMinHeapSize -v NewValue
  • To change the Debug Port set to a Broker's EG: [-v parameter should be a 4-digit value]
             
mqsichangeproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ComIbmJVMManager -n jvmDebugPort -v NewValue
___________________________________________________________________________________________________________________________________________________
  • Commands for taking trace: [-u indicates 'User Trace' and -t indicates 'Service Trace']
               
Values of -l (Trace Level) parameter:
1. normal,
2. none,
3. debug.
Values of -m (Mode) parameter:
1. safe,
2. fast.
User Trace:                  
  • To view the user trace: (Optional -f to view the trace level of a particular message flow deployed onto an EG)
mqsireporttrace BROKER_NAME -u -e EXECUTION_GROUP_NAME -f MESSAGE_FLOW_NAME
  • To set the user trace: (Optional -f to view the trace level of a particular message flow deployed onto an EG)
mqsichangetrace BROKER_NAME -u -e EXECUTION_GROUP_NAME -f MESSAGE_FLOW_NAME -l TRACE_LEVEL -c SIZE_OF_TRACE_IN_KB
Service Trace:                
  • To view the service trace: (Optional -f to view the trace level of a particular message flow deployed onto an EG)
mqsireporttrace BROKER_NAME -t -e EXECUTION_GROUP_NAME -f MESSAGE_FLOW_NAME
  • To set the service trace: (Optional -f to view the trace level of a particular message flow deployed onto an EG)
mqsichangetrace BROKER_NAME -t -e EXECUTION_GROUP_NAME -f MESSAGE_FLOW_NAME -l TRACE_LEVEL -c SIZE_OF_TRACE
  • To read the trace file: (Optional -f to view the trace level of a particular message flow deployed onto an EG)
mqsireadlog BROKER_NAME -u/-t -e EXECUTION_GROUP_NAME -f MESSAGE_FLOW_NAME -o PATH_TO_FILE_WITH_NAME_AND_EXTENSION
___________________________________________________________________________________________________________________________________________________
To create a BAR file:                
mqsicreatebar -data PATH_TO_BAR_DIRECTORY -b BAR_FILE_NAME -p PROJECT_NAME -o NAME_OF_THE_RESOURCE_TO_BE_ADDED_WITH_EXTN
['-cleanBuild' parameter can be used to refresh the workspace projects and perform a clean build before adding]
Syntax: mqsicreatebar -data workspace -b barName [-version id] [-esql21] [-p projectName [...]] -o filePath1 [filePath2 [...]]
Command Options:
'-data workspace' workspace location (Mandatory)
'-b barName' bar file name to create or replace
'-version id' appends '_' and id to compiled names in the archive (optional)
'-esql21' compile ESQL for brokers version 2.1 (optional)
'-p projectName' specify projects containing files to link (optional, multiple projects can be specified)
'-o filePath1' workspace relative path (including the project) of deployable files to add to the broker archive. Multiple deployable files can be compiled in a single mqsicreatebar command.
___________________________________________________________________________________________________________________________________________________
  • To cancel all outstanding deployments:
               
mqsideploy -n PATH_TO_CONFIGURATION_MANAGER_FILE -c
  • To deploy a BAR file:
mqsideploy -n PATH_TO_CONFIGURATION_MANAGER_FILE -b BROKER_NAME -e EXECUTION_GROUP_NAME -a PATH_TO_BAR_FILE_NAME
  • To remove a flow or resource from the Broker's EG:
mqsideploy -n PATH_TO_CONFIGURATION_MANAGER_FILE -b BROKER_NAME -e EXECUTION_GROUP_NAME -d FLOW_OR_RESOURCE_NAME_TO_BE_UNDEPLOYED
NOTE:
1. For all the mqsideploy commands above, a combination of -i, -p & -q parameters can be used instead of -n. -i carries the machine name, -p indicates the port on which the Queue Manager is open and -q represents the name of the Queue Manager,
2. An additional '-w' parameter can be added at the end of the command to set a Timeout Value (in seconds).
___________________________________________________________________________________________________________________________________________________
  • To reload/restart a particular Execution Group:
               
mqsireload BROKER_NAME -e EXECUTION_GROUP_NAME
  • To reload/restart all the Execution Groups of the Broker: [This command does not restart the Broker]
mqsireload BROKER_NAME
___________________________________________________________________________________________________________________________________________________
  • To stop a Broker: [Optional '-i' parameter before BROKER_NAME immediately stops the Broker, else, the Broker is stopped in Control Mode. Optional '-q' parameter after BROKER_NAME stops the Broker's Queue Manager along with the Broker]
[CONFIGURATION_MANAGER_NAME, USER_NAME_SERVER or DATABASE_INSTANCE_MANAGER can be used in place of BROKER_NAME to stop the respective Component]
mqsistop BROKER_NAME
  • To stop a Broker's EG:
               
mqsistop BROKER_NAME -e EXECUTION_GROUP_NAME
  • To stop a Message Flow running on a Broker's EG:
               
mqsistopmsgflow BROKER_NAME -e EXECUTION_GROUP_NAME -m MESSAGE_FLOW_NAME
___________________________________________________________________________________________________________________________________________________
  • To start a Broker:
               
[CONFIGURATION_MANAGER_NAME, USER_NAME_SERVER or DATABASE_INSTANCE_MANAGER can be used in place of BROKER_NAME to stop the respective Component]
mqsistart BROKER_NAME
  • To start a Broker's EG:
               
mqsistart BROKER_NAME -e EXECUTION_GROUP_NAME
  • To start a Message Flow running on a Broker's EG:
               
mqsistartmsgflow BROKER_NAME -e EXECUTION_GROUP_NAME -m MESSAGE_FLOW_NAME
___________________________________________________________________________________________________________________________________________________
  • To set the DSN Name to a Broker which will be used by the flows deployed onto its' EGs:
             
mqsisetdbparms BROKER_NAME -n DSN_NAME -u USER_ID -p PASSWORD
  • To reset the DSN Name to a Broker which will be used by the flows deployed onto its' EGs:
             
mqsisetdbparms BROKER_NAME -n DSN_NAME - -u USER_ID -p PASSWORD
  • To remove the DSN Name to a Broker which was used by the flows deployed onto its' EGs:
             
mqsisetdbparms BROKER_NAME -n DSN_NAME -d
______________________________________________________________________________________
  • To list/display/export an ACL Entry:
               
mqsilistaclentry CONFIGURATION_MANAGER_NAME -n .configmgr_FILE_NAME -f FILE_TO_WHICH_THE_ACL_ENTRIES_ARE_EXPORTED
  • To create an ACL Entry:
               
mqsilistaclentry CONFIGURATION_MANAGER_NAME -n .configmgr_FILE_NAME -f FILE_FROM_WHICH_THE_ACL_ENTRIES_ARE_IMPORTED
  • To delete an ACL Entry:
               
mqsideleteaclentry CONFIGURATION_MANAGER_NAME -n .configmgr_FILE_NAME -f FILE_FROM_WHICH_THE_ACL_ENTRIES_ARE_IMPORTED
___________________________________________________________________________________________________________________________________________________
  • To create a Broker:
               
mqsicreatebroker BROKER_NAME -i USER_ID -a PASSWORD -q BROKER_QUEUE_MANAGER_NAME
  • To create a Configuration Manager:
               
mqsicreateconfigmgr CONFIGURATION_MANAGER_NAME -i USER_ID -a PASSWORD -q BROKER_QUEUE_MANAGER_NAME
  • To create a User Name Server: [Optional '-r' parameter can be added to set the Refresh Interval at the end of the command with a value in seconds. Default value is 60 seconds]
   
mqsicreateusernameserver -i USER_ID -a PASSWORD -q BROKER_QUEUE_MANAGER_NAME
___________________________________________________________________________________________________________________________________________________
  • To delete a Broker: [Optional '-q' parameter can be added to delete the associated Queue Manager along with the Broker]
         
[Optional '-w' parameter can be added to delete all the files related to the Broker under the work path mentioned by '-w's value]
mqsideletebroker BROKER_NAME
  • To delete a Configuration Manager: [Optional '-q' parameter can be added to delete the associated Queue Manager along with the Configuration Manager]
   
mqsideleteconfigmgr CONFIGURATION_MANAGER_NAME
  • To delete a User Name Server: [Optional '-q' parameter can be added to delete the associated Queue Manager along with the User Name Server]
     
[Optional '-w' parameter can be added to delete all the files related to the User Name Server under the work path mentioned by '-w's value]
mqsideleteusernameserver
___________________________________________________________________________________________________________________________________________________
  • To create a Configurable Service:
               
mqsicreateconfigurableservice BROKER_NAME -c CONFIGURABLE_SERVICE_NAME -o ObjectName -n PropertyName -v PropertyValue
  • To delete a Configurable Service:
               
mqsideleteconfigurableservice BROKER_NAME -c CONFIGURABLE_SERVICE_NAME -o ObjectName
___________________________________________________________________________________________________________________________________________________
  • To perform the Component Verification:
               
mqsicvp COMPONENT_NAME
[COMPONENT_NAME can be BROKER_NAME or CONFIGURATION_MANAGER_NAME]
INSERT INTO T2 (EMPID, EMPNAME, EMPADDR) VALUES (:hv_valid_emp_id, :hv_name, :hv_addr) 
___________________________________________________________________________________________________________________________________________________