CICS - Group home

How to use CICS IA to collect and display MQ resources

  

CICS IA COLLECTING AND DISPLAYING MQ DATA

CICS IA collects and displays the MQ data to analyze the flow of MQ commands and the dependent resources. This blog elaborates on the benefits of resource utilization related to MQ and a list of MQ commands used.

Some terminologies related to MQ

A Message Queue (MQ) is used to send or receive messages between different applications. One application puts a message on a queue on one system, and another gets the same message from the source queue on a different system. Different ways of message exchange using MQ
•       Send a message to the local queue
•       Send a message to the remote queue
•       Send a message on a client-server configuration

Connection details between CICS and MQ

CICS provides two resources in support of MQ,
  • MQCONN for defining the attributes of the CICS-MQ connection
  • MQMONITOR for defining the attributes of an MQ message consumer upon successful connection, the below 2 CICS transactions will be started.
  • CKTI – CICS MQ trigger monitor
  • CKAM – MQ alert monitor

Usage of CICS IA plug-in with MQ resources

CICS IA plug-in is used to analyze and explore the collected data about MQ resources. CICS IA collects data about the below MQ commands. 
  • MQCONNX
  • MQCONN
  • MQCMIT
  • MQBACK
  • MQBEGIN
  • MQCLOSE
  • MQDISC
  • MQGET
  • MQINQ
  • MQOPEN
  • MQPUT
  • MQSET

The below image displays how MQ data is collected using Cobol-CICS.

Steps to collect MQ data
  • Start the CICS region
  • Install and define the written Cobol programs and add them to load libraries
  • Install and define a new transaction which should be 4 letter word (enter the main program name while installing the new transaction)
  • Verify the installation of the program by running the transaction. The transaction should run without issues by performing the written program's operations.
  • Clear the region and run the transaction CINT (this transaction is a CICS IA control transaction. It should run and open the CICS IA menu page if CICS IA is installed in that CICS region).
  • Go to the CICS IA configuration page and configure the details that which user wants to collect. For option 'Collect MQ resource,' Give 'Y' for yes.
  • Go to the CICS IA operation menu page, start the collector and return to the transaction running page. Run the transaction, which is installed with MQ programs and commands.
  • Go to the CICS IA operation menu page and stop the collector. The data will be collected during this process.
  • Clear the region and run the transaction CINC (this transaction is a CICS IA command flow transaction. It should run and open the CICS IA command flow page if CICS IA is installed in that CICS region).
  • The 'Usage of command include list' option is available for MQ commands. Enter Y to ensure yes for collection, and press the F5 button to start the command flow collector.
  • Return to the transaction running page. Run the transaction, which is installed with MQ programs and commands.
  • Run the CINC transaction and press F6 to stop the collector, which displays the collected data.
Thus, the collection of MQ resources and the flow of commands are completed. After the data collection is completed, all the MQ data will be stored in the VSAM file CIUINT4 (Collected MQ data stored in this file by the default transaction CINB) and GDG file (Collected command flow will be stored in this file). Below
JCL jobs should be submitted to transfer data from the VSAM and GDG files to the CICS IA database.
  • CIUUPDB – Transferring dependency data from VSAM to DB
  • CIUJLCPY – Transferring command flow data from log stream to GDG
  • CIUUPDB5 – Transferring command flow data from GDG to DB

VISUALIZING MQ RESOURCES IN PLUG-IN

After Launching the client explorer, open the CICS IA perspective and make a successful host connection with the below host details to visualize the collected data through the database.

  • Host name
  • Port number
  • DB2 Location
  • Schema name
  • User id
  • Password

Press the "Connect" button to enable the connection successfully. Now, CICS IA gets connected to the database containing the collected data.

Before making a connection, enable the MQ data display option by below steps:

  • Go to the windows menu.
  • Click preferences.
  • Select CICS Interdependency Analyzer.
  • Select the MQ checkbox, which is present under the additional resource type to include (Now MQ resources also displays).  

Follow the below steps from the CICS IA perspective to view MQ resources

  1. In the toolbar, select Resources.
  2. Go to Find.
  3. Click the run

It will display all the resources under the region present under this connected database.

  1. Go to the Queries
  2. Under the IA navigation tab, Expand the MQ supplied
  3. Run the query which contains MQ resources, and the user will get the below data.

Command flow for MQ

Procedure to view the flow of commands used in the program.

  • Go to the user command flow under the IA navigation tab
  • Expand all the options of owner user id until the user reaches the transaction name
  • Click on task id.
  • Click show visualization to view the different types of command flows which varies by the switches
  • Click show execution to view the overall flow of commands used in that whole transaction

Thread safe report showing MQ commands

To generate the Threadsafe report, follow the below steps:

  • Go to the region under the IA navigation tab
  • Right-click on the region name and select the report
  • Click Thread safe report and enter the details
  • Check the detailed report checkbox
  • Select the location and provide a name to save it
  • Click ok, and the thread safe report gets generated.

These are the 3 MQ commands shown in the picture, which is used to update the CICS functions and are created while writing COBOL code.

Thus, MQ resources collection and display in CICS IA makes it easy to understand interrelationships between MQ resources and the corresponding transactions and identify the flow of MQ commands used in CICS.