Thursday, January 30, 2014

WebSphere MQ for Linux Trace

Follow the instructions listed below to start, stop and format WebSphere MQ for Linux trace. Trace files are written to the directory /var/mqm/trace, so delete or relocate old trace files before beginning a new trace.

  • Start trace for every WebSphere MQ process:

      strmqtrc -e

    Or start trace only for one queue manager:

      strmqtrc -m MY.QMGR

    Or start a high detail trace for one queue manager:

      strmqtrc -t all -t detail -m MY.QMGR

    Or start a high detail wrapping trace and limit the file size to ~5MB:

      strmqtrc -l 5 -t all -t detail -m MY.QMGR

  • End all tracing:
      endmqtrc -a
  • Format the trace files:

      dspmqtrc *.TRC

    Or format wrapping trace files:

      dspmqtrc *.TRC *.TRS

    The trace formatter program converts binary files named AMQppppp.TRC (where ppppp is the process identifier or pid which created the file) into readable files named AMQppppp.FMT.
    If you used a wrapping trace, then each time a .TRC reaches the size limit MQ renames it to a .TRS extension and starts a new .TRC file. The trace formatter can convert both files to a single formatted file, but only if you format the .TRC and .TRS files at the same time, as shown above.
    Send formatted trace files to IBM support unless binary traces are specifically requested. To save space, compress the formatted trace files with compress, zip, gzip, or bzip2.

    http://www-01.ibm.com/support/docview.wss?uid=swg21174924#UNIXlt
  • Tuesday, January 21, 2014

    MQ Triggering

    WebSphere MQ TriggeringWebSphere MQ provides a feature that enables an application or channel to be started automatically when there are messages available to retrieve from a queue.

    Trigger messages generated by the queue manager are not persistent. This has the effect of reducing logging (thereby improving performance), and minimizing duplicates during restart, so improving restart time.

    Initiation queue:
    A local queue on which the queue manager puts trigger messages.

    Trigger event: 
    An event (such as a message arriving on a queue) that causes a queue manager to create a trigger message on an initiation queue.

    Trigger message: 
    A message containing information about the program that a trigger monitor is to start.

    Trigger monitor: 
    A continuously-running application serving one or more initiation queues. When a trigger message arrives on an initiation queue, the trigger monitor retrieves the message. It uses the information in the trigger message to start a process that serves the queue on which a trigger event occurred.

    Trigger monitor interface (TMI):
    The MQSeries interface to which customer- or vendor-written trigger monitor programs must conform. A part of the MQSeries Framework.

    Types of triggering:
    1. Channel Triggering 
    2. Application Triggering
    3. Client Triggering

    Before your application can take advantage of triggering, follow the steps below:

    1. Create an initiation queue for your application queue. For example:
     DEFINE QLOCAL (initiation.queue) REPLACE +
     LIKE (SYSTEM.DEFAULT.LOCAL.QUEUE) +
     DESCR ('initiation queue description')

    2. Associate the initiation queue with the application queue. A queue manager can own more than one initiation queue. You may want some of your application queues to be served by different programs, in which case you could use one initiation queue for each serving program, although you do not have to. Here is an example of how to create an application queue:
     DEFINE QLOCAL (application.queue) REPLACE +
     LIKE (SYSTEM.DEFAULT.LOCAL.QUEUE) +
     DESCR ('appl queue description') +
     INITQ ('initiation.queue') +
     PROCESS ('process.name') +
     TRIGGER +
     TRIGTYPE (FIRST)

    3. If you are triggering an application, create a process definition object to contain information relating to the application that is to serve your application queue. For example, to trigger-start a CICS payroll transaction called PAYR:
     DEFINE PROCESS (process.name) +
     REPLACE +
     DESCR ('process description') +
     APPLTYPE ('CICS') +
     APPLICID ('PAYR') +
     USERDATA ('Payroll data')
    When the queue manager creates a trigger message, it copies information from the attributes of the process definition object into the trigger message.

    4. You need to create a process definition if you want to trigger a channel and you are using a Version 2 MQSeries product. Otherwise, you can create a transmission queue definition and use blanks for the ProcessName attribute. The TrigData attribute can contain the name of the channel to be triggered or it can be left blank. Except on WebSphere MQ for z/OS, if it is left blank, the channel initiator searches the channel definition files until it finds a channel that is associated with the named transmission queue. When the queue manager creates a trigger message, it copies information from the TrigData attribute of the transmission queue definition into the trigger message.

    5. If you have created a process definition object to specify properties of the application that is to serve your application queue, associate the process object with your application queue by naming it in the ProcessName attribute of the queue.

    6. Start instances of the trigger monitors (or trigger servers in WebSphere MQ for iSeries) that are to serve the initiation queues you have defined.

    ==>DEFINE QLOCAL(QM2.XMITQ) TRIGGER INITQ(SYSTEM.CHANNEL.INITQ) PROCESS(P1) USAGE (XMITQ)
    ==>DEFINE PROCESS(P1) USERDATA(QM2.XMITQ)

    The figure is a diagram showing a configuration of WebSphere MQ objects and applications, and a sequence of events. The configuration shows a queue manager managing an application queue and an initiation queue. The application queue has an associated process definition object. Three applications, as follows: Application A which can be on a remote system or local to the queue manager. Application B local to the queue manager. Trigger monitor running local to the queue manager. The sequence of events is described in the text following the figure.




    This figure shows a more complex configuration of objects and applications. The configuration is as follows: A queue manager managing two application queues with associated process definition objects, called application queue 1 and 2 and process definition object 1 and 2. An initiation queue. Two sets of applications which can be remote or local to the queue manager. The applications are identified as Applications A, B, and C; and Applications X, and Y. A trigger monitor application running local to the queue manager. Two applications started by triggering running local to the queue manager, identified as Applications K, and L.


    Troubleshooting:

    1. Triggering must be enabled, and of the correct type:
    CHECK:
    Display the TRIGGER TRIGTYPE and TRIGDPTH attributes of the queue to determine the type of triggering that is enabled:
    DIS QL(TRIGGERED_QUEUE) TRIGGER TRIGTYPE TRIGDPTH
    Sample output:
    AMQ8409: Display Queue details. 
       QUEUE(TRIGGERED_QUEUE)                  TYPE(QLOCAL) 
       TRIGGER                                 TRIGDPTH(1) 
       TRIGTYPE(FIRST)

    ACTION:
    If NOTRIGGER is seen in the output, then triggering is disabled. Enable it as follows:
    ALTER QL(TRIGGERED_QUEUE) TRIGGER
    In most cases you can expect the type of triggering (TRIGTYPE) to be FIRST.
    A summary of the three types is as follows:
    EVERY
    Trigger events occur every time a message is delivered to the queue. This occurs even if applications already have the queue open to retrieve messages.
    FIRST
    Trigger event occur when the depth of the queue transitions from zero to one.
    DEPTH
    Trigger events occur when the depth of the queue transitions from
    (TRIGDPTH-1) to TRIGDPTH.
    Triggering is automatically disabled on the queue, and must be re-enabled by the application (using MQSET).

    2. No application can already have the queue open to get messages:
    This only applies to FIRST or DEPTH triggering.
    For EVERY triggering, a trigger event occurs every time a message arrives, regardless of how many applications are already actively retrieving messages from the queue.

    CHECK:
    Check the IPPROCS attribute in the QSTATUS for the initiation queue:
    DIS QS(TRIGGERED_QUEUE) IPPROCS

    Sample Output:
    AMQ8450: Display queue status details. 
       QUEUE(TRIGGERED_QUEUE) 
       TYPE(QUEUE)                             CURDEPTH(0) 
       IPPROCS(0)

    You can find which application has the queue open (IPPROCS>0) as follows:
    DIS QS(TRIGGERED_QUEUE) TYPE(HANDLE) APPLTAG PID
    Sample Output:
    AMQ8450: Display queue status details. 
       QUEUE(TRIGGERED_QUEUE) 
       TYPE(HANDLE) 
       APPLTAG(/home/myuser/bin/mycmd) PID(1234)

    ACTION:
    For FIRST or DEPTH triggering, if the IPPROCS number is any number greater than zero, then an application has the queue open to retrieve messages and triggering will not occur.
    If the application is not the one expected to run against this queue, then it must end before the intended application can be triggered.
    The name and PID of the application is shown in the QSTATUS output. If the name contains ‘amqcrsta’ or ‘amqrmppa’, then a remote client application has the queue open (this could be an administrator on another machine).
    If an ‘amqrmppa’ process is terminated (kill -9 PID), this will shut down any other channels running within that process.

    If the application connected to the queue is the triggered application for this queue, then the application team should be involved to investigate why the application is failing to process messages from the queue.

    3. The initiation queue must be valid:
    CHECK:
    Display the INITQ attribute of the triggered queue:
    DIS QL(TRIGGERED_QUEUE) INITQ
    Sample Output:
    AMQ8409: Display Queue details. 
      QUEUE(TRIGGERED_QUEUE)                    TYPE(QLOCAL) 
      INITQ(SYSTEM.DEFAULT.INITIATION.QUEUE)
    Display the initiation queue to check it exists, is not an XMITQ, and is not inhibited for put or get:
    DIS QL(SYSTEM.DEFAULT.INITIATION.QUEUE) USAGE PUT GET
    Sample Output:
    AMQ8409: Display Queue details. 
       QUEUE(SYSTEM.DEFAULT.INITIATION.QUEUE) 
       TYPE(QLOCAL)                      GET(ENABLED) 
       PUT(ENABLED)                      USAGE(NORMAL)
    Remember to use single ticks for queues with lower case names:
    DIS QL('inititaion.queue') USAGE PUT GET

    ACTION:
    If the INITQ attribute is blank, or incorrect, then change it to the name of the initiation queue against which the trigger monitor will run.
    If the initiation queue is inhibited for put, then enable it as follows:
    ALTER QL(SYSTEM.DEFAULT.INITIATION.QUEUE) PUT(ENABLED)

    4. A trigger monitor must be active against the initiation queue:
    CHECK:
    Check the IPPROCS attribute in the QSTATUS for the initiation queue:
    DIS QS(SYSTEM.DEFAULT.INITIATION.QUEUE) IPPROCS
    Sample Output:
    AMQ8450: Display queue status details. 
       QUEUE(SYSTEM.DEFAULT.INITIATION.QUEUE) 
       TYPE(QUEUE)                             CURDEPTH(0) 
       IPPROCS(1)
    IPPROCS is the number of applications that have the queue open for input, or browse. This should be exactly 1.

    Check the app which has the queue open is the Trigger Monitor:
    DIS QS(SYSTEM.DEFAULT.INITIATION.QUEUE) TYPE(HANDLE) APPLTAG
    Sample Output:
    AMQ8450: Display queue status details. 
       QUEUE(SYSTEM.DEFAULT.INITIATION.QUEUE) 
       TYPE(HANDLE) 
       APPLTAG(/opt/mqm/bin/runmqtrm)
    ACTION:
    The trigger monitor can be started in the background as follows on UNIX:
    nohup runmqtrm -m QMGR_NAME -q SYSTEM.DEFAULT.INITIATION.QUEUE >/dev/null 2>&1 &

    5. The process definition must be valid
    CHECK:
    Display the PROCESS attribute of the triggered queue:
    DIS QL(TRIGGERED_QUEUE) PROCESS
    Sample Output:
    AMQ8409: Display Queue details. 
       QUEUE(TRIGGERED_QUEUE)                  TYPE(QLOCAL) 
       PROCESS(TRIGGERED_PROCESS)
    Ensure the process object exists, and validate the command which will be run by the trigger monitor when the trigger event occurs:
    DIS PROCESS(TRIGGERED_PROCESS) APPLICID
    Sample Output:
    AMQ8407: Display Process details. 
       PROCESS(TRIGGERED_PROCESS)     APPLICID(/home/myuser/bin/mycmd)
    ACTION:

    If the PROCESS attribute is blank, or incorrect, then change it to the name of a valid process object.
    If the APPLICID attribute of the process object is incorrect, then alter it to correctly match the command which should be run.
    Remember that on UNIX machines commands are case-sensitive, so must be entered in single ticks when defining/altering a process object in MQSC:
    DEF PROCESS(TRIGGERED_PROCESS) APPLICID('/home/myusr/bin/mycmd')

    6. The trigger monitor must be able to start the application
    CHECK:
    If the application fails to start an application, it places the trigger message on the dead-letter queue, with a feedback code in the ‘Reason’ field.
    The Application Programming Reference manual describes the possible MQFB_* feedback codes

    You can use the WebSphere MQ Explorer (or MO71) to view the message:
    Connect to the queue manager using the WebSphere MQ Explorer.
    Browse the contents of the dead-letter queue for the queue manager.
    The WMQ Explorer understands the format of the DLH header that is added to a message when it is placed on the DLQ.
    Look at the ‘Reason’ field in the dead-letter header
    If it is displayed in numeric form, the following link to the Constants manual should help to translate it to a MQFB_* code:

    ACTION:
    Investigate and resolve the problem starting the application.

    7. The application must connect to the queue after it is started

    CHECK:
    From a WMQ administrator’s point of view, you can check whether the application is being started by the trigger monitor. Further investigation of the application’s operation would be performed by inspecting the application’s own logging/diagnostic info.

    If you need to absolutely confirm that an application is being started by a trigger monitor, then the following process can be performed to restart the trigger monitor in the foreground (so you can see the output on your screen):

    1. The best way to stop a trigger monitor is to inhibit the initiation queue for get: ALTER QL(SYSTEM.DEFAULT.INITIATION.QUEUE) GET(DISABLED)
    2. You can then immediately un-inhibit get on the queue:                                    ALTER QL(SYSTEM.DEFAULT.INITIATION.QUEUE) GET(ENABLED)
    3. You can now run the trigger monitor as a foreground process, so you can monitor the output:runmqtrm -m QMGR_NAME -q SYSTEM.DEFAULT.INITIATION.QUEUE
    4. You will now need to open a new terminal (telnet/ssh session)
    5. Disable and re-enable triggering on the queue to see the output from the trigger monitor when a trigger message is processed:                                                 ALTER QL(TRIGGERED_QUEUE) NOTRIGGER                                                   ALTER QL(TRIGGERED_QUEUE) TRIGGER

    Sunday, January 19, 2014

    Distributed Queue Management (DQM)

    Distributed queueing means sending the business data(msgs) from one queue manager to another queue manager. The receiving queue manager could be the same machine or a remote one.

    Consider tow sample qmgrs like QM1 and QM2:

    Source queue manager: QM1
    Remote queue definition 
    Transmission queue definition
    Sender channel definition

    Destination queue manager: QM2
    Local queue (r-name)
    Receiver channel definition
    Listener definition.

    Configuration:
    CRTMQM QM1
    STRMQM QM1
    RUNMQSC QM1
    DEFINE QREMOTE(QM1.RQ1) RNAME(QM2.LQ1) RQMNAME(QM2) XMITQ(QM2.XMITQ)
    DEF QL(QM2.XMITQ) USAGE(XMITQ)
    DEF CHANNEL(QM1.QM2) CHLTYPE(SDR) CONNAME('HOSTNAME(PORT)') XMITQ(QM2.XMITQ)
    START CHANNEL(QM1.QM2)
    END
    *******************************************************************************************************
    CRTMQM QM2
    STRMQM QM2
    RUNMQSC QM2
    DEFINE QLOCAL(QM2.LQ1)
    DEF CHANNEL(QM1.QM2) CHLTYPE(RCVR) 
    DEF LSTR(LSTR.TCP) PORT(1414) TRPTYPE(TCP)
    STA LSTR(LSTR.TCP)
    END

    After completing the configuration, check the application connectivity using MQI put and get calls.

    "amqsput" and "amqsget" is a sample programs to put and get the messages.

    ==>AMQSPUT QM1.RQ1 QM1 (put the input data)
    (double enter: end the amqsput program)

    ==>AMQSGET QM2.LQ1 QM2 (get the output data)


    Messages are sent from the transmission queue at the sender end, to destination queues at the receiver end.
    1. The sender application put the business data in Remote queue.
    2. The Remote queue dos't store any data, just it add the destination/target queue and queue manager details and put it into transmission queue.
    3. Transmission queue is a type of local queue, it store the data temp,,
    4. The sender MCA(messages channel agent) pick the data from transmission queue to keeps on SDR channel.
    5. The receiver MCA pick the data from receiver channel and posted the target queue.
    6. The destination application connected to the target queue and process the business data/messages.

    Friday, January 17, 2014

    List Of WebSphere MQSC Commands

    1. RUNMQLSR - MQ TCP listener (multi-threaded)
    2. AMQCLMAA - MQ TCP listener (single-threaded)
    3. AMQRMPPA - Channel process pooling job
    4. RUNMQCHI - MQ channel initiator
    5. AMQCRSTA - MQ receiving MCA jobs
    6. RUNMQCHL - MQ sending MCA jobs
    7. AMQCRS6B - LU62 receiver channel
    8. AMQPCSEA - MQ command server
    9. RUNMQTRM - Application trigger monitor
    10. RUNMQDLQ - Dead letter queue handler
    11. AMQFCXBA - MQ Broker Worker Job
    12. RUNMQBRK - MQ Broker Control Job
    13. AMQZMUC0 - MQ Utility Manager
    14. AMQZMUR0 - MQ Utility Manager
    15. AMQZMGR0 - MQ Process Controller
    16. AMQRRMFA - MQ cluster repository manager
    17. AMQZDMAA - MQ deferred message manager
    18. AMQALMPX - MQ Log Manager
    19. AMQZFUMA - MQ Object Authority Manager
    20. AMQZLAS0 - MQ Local Queue Manager agents
    21. AMQZLAA0 - MQ Local Queue Manager agents
    22. AMQZXMA0 - MQ Execution Controller

    Thursday, January 16, 2014

    WebSphere MQ installation procedure in Unix box's

    You are planning to install or upgrade a WebSphere MQ server on a UNIX or Linux system and need to know how to tune the operating system, including user limits and kernel parameters for resources like shared memory and semaphores.

    You can Install MQ Series in UNIX you should be Logged as a ROOT.  First you can Install MQ7.0 after you can Install FIX Pack MQ v7.1.0.3/8/9

     Switch User :-         /  su root
                                    /  password
    Give the path of the MQ Software, where u have that specify here
                    Home/Nagireddy/Desktop/MQ v7.0
    Change the permissions of the File          :                    / chmod 755 FILENAME
    To Change the all files at a time the command is        / chmod 755 *.*
     After you can accept the License the command is    ./mqlicense.sh –accept

    You can Install these Applications In MQ7.0  :-
         MQSeriesRuntime-7.0.1.3.i386.rpm  
         MQSericeSDK-7.0.1.3.i386.rpm
         MQSeriesJava-7.0.1.3.i386.rpm
         MQSeriesServer -7.0.1.3.i386.rpm
         MQSeriesSamples-7.0.1.3.i386.rpm

    The Command Is:-
                rpm –ivh MQSeriesRuntime-7.0.1.3.i386.rpm
                rpm –ivh MQSeriesServer -7.0.1.3.i386.rpm

    (Some time's the installation fails, when that time you need to use the following command.
                "SETENFORCE 0" : force installation)

    In the same way Install all the Applications……… using ( rpm –ivh ) After Installing MQ7.0 you can Install MQ7.1 FIX Pack

                         PATH=$PATH:/ opt/mqm/samp/bin

    Un-installation Procedure:-
    If you want to un Install the MQ Series First you can un Install the MQ7.1FIX PACK after un Install MQ7.0
    In Un-install process you can remove the .rpm of the application. The command is
    ==> rpm –ev MQSeriesRuntime-7.0.1.3.i386.rpm (OR)  rpm –e MQSeriesRuntime-7.0.1.3.i386.rpm
    Using this Command you can un-install all applications

    ***************MQ V7.5 installation in Linux machine*********************

    [reddy@nagireddy ~]$ su root
    Password:
    [root@nagireddy reddy]# ls
    Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos
    [root@nagireddy reddy]# cd Desktop/
    [root@nagireddy Desktop]# ls
    MQ_7.5.0.2_TRIAL_LNX_ON_X86_32_ML
    [root@nagireddy Desktop]# cd MQ_7.5.0.2_TRIAL_LNX_ON_X86_32_ML/
    [root@nagireddy MQ_7.5.0.2_TRIAL_LNX_ON_X86_32_ML]# ls
    copyright                           MQSeriesMsg_es-7.5.0-2.i386.rpm
    crtmqpkg                            MQSeriesMsg_fr-7.5.0-2.i386.rpm
    lap                                 MQSeriesMsg_hu-7.5.0-2.i386.rpm
    licenses                            MQSeriesMsg_it-7.5.0-2.i386.rpm
    mqlicense.sh                        MQSeriesMsg_ja-7.5.0-2.i386.rpm
    MQSeriesAMS-7.5.0-2.i386.rpm        MQSeriesMsg_ko-7.5.0-2.i386.rpm
    MQSeriesClient-7.5.0-2.i386.rpm     MQSeriesMsg_pl-7.5.0-2.i386.rpm
    MQSeriesExplorer-7.5.0-2.i386.rpm   MQSeriesMsg_pt-7.5.0-2.i386.rpm
    MQSeriesFTAgent-7.5.0-2.i386.rpm    MQSeriesMsg_ru-7.5.0-2.i386.rpm
    MQSeriesFTBase-7.5.0-2.i386.rpm     MQSeriesMsg_Zh_CN-7.5.0-2.i386.rpm
    MQSeriesFTLogger-7.5.0-2.i386.rpm   MQSeriesMsg_Zh_TW-7.5.0-2.i386.rpm
    MQSeriesFTService-7.5.0-2.i386.rpm  MQSeriesRuntime-7.5.0-2.i386.rpm
    MQSeriesFTTools-7.5.0-2.i386.rpm    MQSeriesSamples-7.5.0-2.i386.rpm
    MQSeriesGSKit-7.5.0-2.i386.rpm      MQSeriesSDK-7.5.0-2.i386.rpm
    MQSeriesJava-7.5.0-2.i386.rpm       MQSeriesServer-7.5.0-2.i386.rpm
    MQSeriesJRE-7.5.0-2.i386.rpm        PreReqs
    MQSeriesMan-7.5.0-2.i386.rpm        READMEs
    MQSeriesMsg_cs-7.5.0-2.i386.rpm     repackage
    MQSeriesMsg_de-7.5.0-2.i386.rpm
    [root@nagireddy MQ_7.5.0.2_TRIAL_LNX_ON_X86_32_ML]# ls -a all
    ls: cannot access all: No such file or directory
    [root@nagireddy MQ_7.5.0.2_TRIAL_LNX_ON_X86_32_ML]# ls - a all
    ls: cannot access -: No such file or directory
    ls: cannot access a: No such file or directory
    ls: cannot access all: No such file or directory
    [root@nagireddy MQ_7.5.0.2_TRIAL_LNX_ON_X86_32_ML]# ls
    copyright                           MQSeriesMsg_es-7.5.0-2.i386.rpm
    crtmqpkg                            MQSeriesMsg_fr-7.5.0-2.i386.rpm
    lap                                 MQSeriesMsg_hu-7.5.0-2.i386.rpm
    licenses                            MQSeriesMsg_it-7.5.0-2.i386.rpm
    mqlicense.sh                        MQSeriesMsg_ja-7.5.0-2.i386.rpm
    MQSeriesAMS-7.5.0-2.i386.rpm        MQSeriesMsg_ko-7.5.0-2.i386.rpm
    MQSeriesClient-7.5.0-2.i386.rpm     MQSeriesMsg_pl-7.5.0-2.i386.rpm
    MQSeriesExplorer-7.5.0-2.i386.rpm   MQSeriesMsg_pt-7.5.0-2.i386.rpm
    MQSeriesFTAgent-7.5.0-2.i386.rpm    MQSeriesMsg_ru-7.5.0-2.i386.rpm
    MQSeriesFTBase-7.5.0-2.i386.rpm     MQSeriesMsg_Zh_CN-7.5.0-2.i386.rpm
    MQSeriesFTLogger-7.5.0-2.i386.rpm   MQSeriesMsg_Zh_TW-7.5.0-2.i386.rpm
    MQSeriesFTService-7.5.0-2.i386.rpm  MQSeriesRuntime-7.5.0-2.i386.rpm
    MQSeriesFTTools-7.5.0-2.i386.rpm    MQSeriesSamples-7.5.0-2.i386.rpm
    MQSeriesGSKit-7.5.0-2.i386.rpm      MQSeriesSDK-7.5.0-2.i386.rpm
    MQSeriesJava-7.5.0-2.i386.rpm       MQSeriesServer-7.5.0-2.i386.rpm
    MQSeriesJRE-7.5.0-2.i386.rpm        PreReqs
    MQSeriesMan-7.5.0-2.i386.rpm        READMEs
    MQSeriesMsg_cs-7.5.0-2.i386.rpm     repackage
    MQSeriesMsg_de-7.5.0-2.i386.rpm

    [root@nagireddy MQ_7.5.0.2_TRIAL_LNX_ON_X86_32_ML]# ./mqlicense.sh -accept

    Licensed Materials - Property of IBM
                    
     5724-H72

    (C) Copyright IBM Corporation 1994, 2013 All rights reserved.

    US Government Users Restricted Rights - Use, duplication or disclosure
    restricted by GSA ADP Schedule Contract with IBM Corp.



    Agreement accepted:  Proceed with install.

    [root@nagireddy MQ_7.5.0.2_TRIAL_LNX_ON_X86_32_ML]# rpm -ivh MQSeriesRuntime-7.5.0-2.i386.rpm
    Preparing...                ########################################### [100%]
    Creating group mqm
    Creating user mqm
       1:MQSeriesRuntime        ########################################### [100%]

    [root@nagireddy MQ_7.5.0.2_TRIAL_LNX_ON_X86_32_ML]# rpm -ivh MQSeriesServer-7.5.0-2.i386.rpm
    Preparing...                ########################################### [100%]
       1:MQSeriesServer         ########################################### [100%]

    After the installation has completed, run the '/opt/mqm/bin/mqconfig'
    command, using the 'mqm' user ID.

    For example, execute the following statement when running as the 'root' user:

        su mqm -c "/opt/mqm/bin/mqconfig"

    The 'mqconfig' command validates that the system configuration satisfies the
    requirements for WebSphere MQ, and ensures that the settings for the 'mqm'
    user ID are suitably configured.  Other WebSphere MQ administrators in the
    'mqm' group can run this command to ensure their user limits are also
    properly configured to use WebSphere MQ.

    If 'mqconfig' indicates that any of the requirements have not been met,
    consult the installation section within the WebSphere MQ Information Center
    for details about how to configure the system and user limits.

    [root@nagireddy MQ_7.5.0.2_TRIAL_LNX_ON_X86_32_ML]# rpm -ivh MQSeriesClient-7.5.0-2.i386.rpm
    Preparing...                ########################################### [100%]
       1:MQSeriesClient         ########################################### [100%]

    [root@nagireddy MQ_7.5.0.2_TRIAL_LNX_ON_X86_32_ML]# rpm -ivh MQSeriesSamples-7.5.0-2.i386.rpm
    Preparing...                ########################################### [100%]
       1:MQSeriesSamples        ########################################### [100%]

    [root@nagireddy MQ_7.5.0.2_TRIAL_LNX_ON_X86_32_ML]# rpm -ivh MQSeriesSDK-7.5.0-2.i386.rpm
    Preparing...                ########################################### [100%]
       1:MQSeriesSDK            ########################################### [100%]



    [root@nagireddy MQ_7.5.0.2_TRIAL_LNX_ON_X86_32_ML]# dspmqver
    AMQ8594: WebSphere MQ commands are no longer available in /usr/bin.

    In order to run MQ commands you must manage your path configuration as
    described in the WebSphere MQ product documentation. In particular review the
    topic on "Choosing a primary installation".

    [root@nagireddy MQ_7.5.0.2_TRIAL_LNX_ON_X86_32_ML]# dspmq
    bash: dspmq: command not found


    [root@nagireddy home]# /opt/mqm/bin/setmqinst -i -p /opt/mqm
    Refreshing settings for Primary Installation 'Installation1' (/opt/mqm).
    87 of 87 tasks have been completed successfuly.
    'Installation1' (/opt/mqm) set as the Primary Installation.

    [root@nagireddy home]# dspmqinst
    InstName:      Installation1
    InstDesc:                                                                     
    Identifier:    1
    InstPath:      /opt/mqm
    Version:       7.5.0.2
    Primary:       Yes
    State:         Available

    *****************Installation done**********

    [root@nagireddy home]# crtmqm QM1
    AMQ7077: You are not authorized to perform the requested operation.

    [root@nagireddy home]# su mqm
    bash-4.1$ crtmqm QM1
    There are 90 days left in the trial period for this copy of WebSphere MQ.
    WebSphere MQ queue manager created.
    Directory '/var/mqm/qmgrs/QM1' created.
    The queue manager is associated with installation 'Installation1'.
    Creating or replacing default objects for queue manager 'QM1'.
    stDefault objects statistics : 74 created. 0 replaced. 0 failed.
    Completing setup.
    Setup completed.
    rbash-4.1$ strmqm QM1
    There are 90 days left in the trial period for this copy of WebSphere MQ.
    WebSphere MQ queue manager 'QM1' starting.
    The queue manager is associated with installation 'Installation1'.
    5 log records accessed on queue manager 'QM1' during the log replay phase.
    Log replay for queue manager 'QM1' complete.
    Transaction manager state recovered for queue manager 'QM1'.
    WebSphere MQ queue manager 'QM1' started using V7.5.0.2.
    bash-4.1$ runmqsc QM1
    5724-H72 (C) Copyright IBM Corp. 1994, 2011.  ALL RIGHTS RESERVED.

    Starting MQSC for queue manager QM1.

    Wednesday, January 15, 2014

    WebSphere MQ Basics


    Introduction to WebSphere MQ:
    WebSphere MQ is messaging for applications. It sends messages(Business data) across networks of diverse components. Your application connects to WebSphere MQ to send or receive a message. WebSphere MQ handles the different processors, operating systems, subsystems, and communication protocols it encounters in transferring the message. If a connection or a processor is temporarily unavailable, WebSphere MQ queues the message and forwards it when the connection is back online.
    An application has a choice of programming interfaces, and programming languages to connect to WebSphere MQ.

    WebSphere MQ is messaging and queuing middle-ware with point-to-point, publish/subscribe, and file transfer modes of operation. Applications can publish messages to many subscribers over multicast.

    Point-to-point:
    Applications send messages to a queue, or to a list of queues. The sender must know the name of the destination, but not where it is.

    Publish/subscribe:
    Applications publish a message on a topic, such as the result of a game played by a team. WebSphere MQ sends copies of the message to applications that subscribe to the results topic. They receive the message with the results of games played by the team. The publisher does not know the names of subscribers, or where they are.

    Basic MQ topics:
    #1 MQ INTERCOMMUNICATION
    Types of MQ Objects (Queues, Channels, Listeners, Topic, Subscription)
    Types of Queues, Messages and Channels 
    #2 TRIGGERING
    Channels triggering
    Application triggering
    #3 DEAD LETTER QUEUE AND DLQ HANDLER USAGE
    Setting up DLQ and using DLQ handler
    #4 CLIENT-SERVER ARCHITECTURE
    Using MQ Environment variable
    CCDT file
    #5 MQI function CALLS
    API/MQI function calls and usage (13++)
    #6 LOGGING MECHANISM
    Error logs (QMGR/System level)
    Transaction Logs (Circular and Linear logging and usage of the logging)
    #7 CLUSTERS
    Repository’s and Workload balancing
    Queue High-availability and QMGR High availability 
    #8 CLUSTER OVERLAPPING
    Intercommunication in between more than   one cluster
    #9 MQ MULTI-HOPPING
    sending messages using intermediate queue managers from one qmgr to another qmgr.
    #10 SECURITY
    Queue / qmgr / Link-lever security and how to grant/revert-back the authority.
    #11 MULTI-INSTANCE QUEUE MANAGERS CREATION
    Setting-up multi instance queue managers and advantages.
    #12 MQ CONFIGURATION FILES OVERVIEW
    QM.INI and MQS.INI
    #13 MQ CONFIGURATION BACKUP & MESSAGES BACKUP
    Queue load and Save qmgr or DSPMQCFG


    Control commands:which are run from the command line. You create, start, and stop queue managers with the control commands.

    crtmqm              :- use the command to create a Queue manager
    strmqm              :- use the command to Start the Queue Manager
    endmqm             :- use the command to Stop the Queue Manager
    dltmqm              :-  use the command to to Delete the Queue Manager
    dspmq                :- to Check the Status of the Queue Manager
    dspmq –m (qmgr):-to Check the Status of Particular Queue manager
              
    MQ Script Commands:-(MQSC)
    runmqsc (qmgr_name):-Use the runmqsc command to issues MQSC commands to a qmgr. Ex:-  runmqsc QM1

    Define:- It’s used for defining the object in queue manager(queue, channel, listener, process..etc).

    QUEUE TYPES:- mainly we can use 3 objects
    1. Remote queue
    2. Local queue
    3. Transmission queue

    Remote Queue: it's a logical queue, contain's destination details. 
    DEFINE QREMOTE('Remote Queue Name') +  
    RNAME('Destination Queue Name') +  
    RQMNAME(Destination MQGR Name) +  
    XMITQ(Transmission Queue Name) + 
    NOREPLACE

    display qr(RQ name) : Display the remote queue detailsdis

    qr(*) where(xmitq eq transmission_q_name) : we can filter the RQ's based on xmitqs

    Local Queue: it's store the msg's 

    DEFINE QLOCAL('q name') +  
    DESCR('Local queue - No remote definitions') +  
    MAXMSGL(4194304) +  
    MAXDEPTH(5000) + 
    NOREPLACE

    Alter qlocal(q name) : Alter the local queueIf u want to see the ATTRIBUTES of  a queue the command is:display qlocal(q name) 

    dis qs(q name)       : Check the status of the queue
    DIS QS(QM2.LQ1)
         6 : DIS QS(QM2.LQ1)
    AMQ8450: Display queue status details.
       QUEUE(QM2.LQ1)                          TYPE(QUEUE)
       CURDEPTH(1)                             IPPROCS(0)
       LGETDATE( )                             LGETTIME( )
       LPUTDATE( )                             LPUTTIME( )
       MEDIALOG( )                             MONQ(OFF)
       MSGAGE( )                               OPPROCS(1)
       QTIME( , )                              UNCOM(NO)

    DISPLAY QSTATUS(QNAME) TYPE(HANDLE)  : Check which app connect to the queue.
    • z/OS batch job name
    • TSO USERID
    • CICS® APPLID
    • IMS™ region name
    • Channel initiator job name
    • i5/OS™ job name
    • UNIX process
    DIS QS(QM2.LQ1) TYPE(HANDLE)
         5 : DIS QS(QM2.LQ1) TYPE(HANDLE)
    AMQ8450: Display queue status details.
       QUEUE(QM2.LQ1)                          TYPE(HANDLE)
       APPLTAG(WebSphere MQ\bin\amqsput.exe)-connected application to put the msgs
    delete ql(q name) : delete the queue

    Transmission queue: It's nothing but local queue, it holds the msg's temporarily.  

    def ql(q name) usage(xmitq):if you don't mention usage attribute as "xmitq" it's a local queue. make sure you need to mention usage attribute as "xmitq"

    CHANNEL: it's nothing but communication link b/w source and target qmgrs.

    SENDER CHANNEL: if you want to create a SENDER CHANNEL u can Specify the channel name, channel type (SDR) ,Transport type, connection name & Transmission Queue name..

    DEFINE CHANNEL('SDR chl_name') +  
    CHLTYPE(SDR) + 
    CONNAME('Host_name(port)') + 
    XMITQ(Xmitq name) +  
    MCAUSER(' ') + 
    MAXMSGL(4194304) + 
    NOREPLACE

    DEFINE CHANNEL('RCVR chl_name') +  

    CHLTYPE(RCVR) + 
    MCAUSER(' ') + 
    MAXMSGL(4194304) + 
    NOREPLACE

    display channel(channel_name) : Display the chl attributes

    DIS CHL(QM1.QM2)
         6 : DIS CHL(QM1.QM2)
    AMQ8414: Display Channel details.
       CHANNEL(QM1.QM2)                        CHLTYPE(SDR)
       ALTDATE(2014-01-17)                     ALTTIME(14.10.44)
       CONNAME(LOCALHOST(1418))                CONVERT(NO)

    dis chs(chl name) :display the channel status running or not.
    DIS CHS(QM1.QM2)
         5 : DIS CHS(QM1.QM2)
    AMQ8417: Display Channel Status details.
       CHANNEL(QM1.QM2)                        CHLTYPE(SDR)
       CONNAME(127.0.0.1(1418))                CURRENT
       RQMNAME(QM2)                            STATUS(RUNNING)
       SUBSTATE(MQGET)                         XMITQ(APP.XMITQ)
    start chl(chl_name) :Starting the channel
    stop chl(chl_name) :stop the channel

    REATING A LISTENER: Listener is nothing but a program in a particular port number.
    DEFINE LISTENER('lstr_Name') +  
    CHLTYPE(RCVR) +
    PORT(1414) + 
    NOREPLACE

    1414-its a default port number (IBM suggested)
    START LSTR(LSTR_NAME): start the lstr
    DISPLAY LSTR(LSTR_NAME): display the lstr

    Source Queue Manager:QM1
    C:\Windows\system32>RUNMQSC QM1
    5724-H72 (C) Copyright IBM Corp. 1994, 2011.  ALL RIGHTS RESERVED.
    Starting MQSC for queue manager QM1.

    DEF QR(QM1.RQ1) RNAME(QM2.LQ1) RQMANE(QM2) XMITQ(APP.XMITQ)
         1 : DEF QR(QM1.RQ1) RNAME(QM2.LQ1) XMITQ(APP.XMITQ)
    AMQ8006: WebSphere MQ queue created.
           :
    DEF QL(APP.XMITQ) USAGE(XMITQ)
         2 : DEF QL(APP.XMITQ) USAGE(XMITQ)
    AMQ8006: WebSphere MQ queue created.
           :
    DEF CHL(QM1.QM2) CHLTYPE(SDR) CONNAME('LOCALHOST(1418)') XMITQ(APP.XMITQ)
         3 : DEF CHL(QM1.QM2) CHLTYPE(SDR) CONNAME('LOCALHOST(1418)') XMITQ(APP.XMITQ)
    AMQ8014: WebSphere MQ channel created.
           :
    STA CHL(QM1.QM2)
         4 : STA CHL(QM1.QM2)

    AMQ8018: Start WebSphere MQ channel accepted.

    Target Qmanager:QM2
    C:\Windows\system32>RUNMQSC QM2
    5724-H72 (C) Copyright IBM Corp. 1994, 2011.  ALL RIGHTS RESERVED.
    Starting MQSC for queue manager QM2.

    DEF QL(QM2.LQ1)
         1 : DEF QL(QM2.LQ1)
    AMQ8006: WebSphere MQ queue created.
           :
    DEF CHL(QM1.QM2) CHLTYPE(RCVR)
         2 : DEF CHL(QM1.QM2) CHLTYPE(RCVR)
    AMQ8014: WebSphere MQ channel created.
           :
    DEF LSTR(LSTR.1418) TRPTYPE(TCP) PORT(1418)
         3 : DEF LSTR(LSTR.1418) TRPTYPE(TCP) PORT(1418)
    AMQ8626: WebSphere MQ listener created.
           :
    STA LSTR(LSTR.1418)
         4 : STA LSTR(LSTR.1418)

    AMQ8021: Request to start WebSphere MQ listener accepted.