CA OPS/MVS

Expand all | Collapse all

MQ and Stateman

  • 1.  MQ and Stateman

    Posted 08-06-2015 01:54 PM

    Just wondering how everyone is handling MQ within Stateman.

     

    In our shop we have MSTR, CHIN, BTCH and DLQH task. We issue one command for the MSTR, one command for the CHIN and a regular start/stop command for the BTCH and DLQH. We have it working at IPL but bringing it down and back up causes some things to happen that should not be. In order to get IPL to work we did the following:

     

    From our Action Table:

    xxxxMSTR   DOWN_UP   MVSCMD("xxxx START QMGR PARM(ourparm)")

    xxxxCHIN   DOWN_UP   MVSCMD("xxxx START CHINIT")

    The BTCH and DLQH we let default to the generic Start command.

     

    xxxxBTCH   UP_DOWN   MVSCMD("xxxx STOP QMGR")

    xxxxDLQH   UP_DOWN   blank

    xxxxCHIN    UP_DOWN   blank

    xxxxMSTR   UP_DOWN   blank

     

    BTCH and DLQH have prereqs of CHIN and CHIN has a prereq of MSTR.

     

    My current plan is to create a simple REXX which will issue the appropriate commands based on a parm and use the type to set up the action table like this:

    MQTASK   DOWN_UP   TSOCMD("OI MQREXX START")

    MQTASK   UP_DOWN   TSOCMD("OI MQREXX STOP")

     

    Questions or comments appreciated.



  • 2.  Re: MQ and Stateman

    Posted 08-06-2015 02:12 PM

    Hello Travi,

     

    We provide this very sample rule CCLXRULM(SSMMQ) to update the current state of your IBM Websphere MQ tasks.

    Also we have another sample code in our library CCLXSAMP(MQQCHK) that can give you ideas on your automation needs.

    As these two samples does not provide you exactly with that your end goal is I believe they can help.

    In specific see if via our Address MQ Host Command that allows you to interface with IBM WebSphere MQ can be of any help for you.

     

    According to our documentation it will let you do the following tasks:

     

    ■ Send and retrieve MQ messages

    ■ Set attributes for the queues or queue managers

    ■ Inquire which attributes are set for the queues or queue managers

     

     

    I will let the rest of the community members to post any other experience they might have already in this area.

    Regards, Cesar



  • 3.  Re: MQ and Stateman

    Posted 08-10-2015 09:21 AM

    Since there is only 'one' command to bring down the MQ component, one effective method would be to set up all control through the MSTR since it is the first task that needs started. Set up your orderly start up as you have it , but for the MQ tasks (BTCH,CHIN,DLQH) that depend on MSTR up first, set their REFMODE value to PREREQ. This setting will tell SSM to only evaluate these tasks during prereq check (starting things up) and not during subreq processing (shutting things down). This setting will allow the stop process for MSTR to execute (not be held up because dependent tasks are active.) Then for the UP_DOWN actions (shutdown) for MSTR, specify the primary stop command for this region - MVSCMD("xxxx STOP QMGR"), and then for the MQ tasks UP_DOWN actions (BTCH,CHIN,DLQH), you can code an action to something like SETCOL("CURRENT_STATE,MQSHUT"). This will simply set a CS state to let you know that the MQ component is being shutdown. CS will be set to DOWN when those components reach EOM by the SSMEOM rule. So simply update REFMODE=PREREQ for the 'task' components (BTCH,CHIN,DLQH) and then  update your action table like : 

    ----------------------------------------------

    Action to START the xxxxMSTR       

                                                   

    Action_Process: ACTION                         

    Action_Current: DOWN                           

    Action_Desired: UP                             

    Action_Res_Type:xxxxMSTR                      

    Action_Text: MVSCMD("xxxx START QMGR PARM(ourparm)")         !! Front-end with SSMRETRY action if using                          

    -----------------------------------------------

    Action to START the xxxxCHIN      

                                                   

    Action_Process: ACTION                         

    Action_Current: DOWN                           

    Action_Desired: UP                             

    Action_Res_Type: xxxxCHIN                       

    Action_Text:  MVSCMD("xxxx START CHINIT")   !! Front-end with SSMRETRY action if using

     

    Generic DOWN_UP wills start the other MQ tasks

    ------------------------------------------------

    Action to STOP the xxxxMSTR             

                                                   

    Action_Process: ACTION                         

    Action_Current: UP                             

    Action_Desired: DOWN                           

    Action_Res_Type: xxxxMSTR                       

    Action_Text: MVSCMD("xxxx STOP QMGR")                                  

    -----------------------------------------------

    Action to STOP the MQ components (this one action would be for  all MQ tasks if you give them a unique type, such as TYPE=MQTASK. If not you will need a UP_DOWN for each xxxxMQtask job)         

                                                   

    Action_Process: ACTION                         

    Action_Current: UP                             

    Action_Desired: DOWN                           

    Action_Res_Type: MQTASK                       

    Action_Text:                                   

       SETCOL("CURRENT_STATE,MQSHUT")            

     

     

    This type of setup can be used for any component that has an orderly start up (task1, then task 2, then task 3,etc), but then has only one command that stops the complete component, such as Websphere. (refer to SSMWEBSP SSM rule as it has the above details explained). Future SSMMQ will have this same explanation detail.