CICS - Group home

How to use CICS IA to collect and display IMS resources

  

CICS IA COLLECTING AND DISPLAYING IMS DATA

The CICS IA collects IMS data to analyze the flow of IMS commands used and the dependent resources. It displays the information about every unique combination of CICS region, transaction, program, and IMS resources recorded by CICS IA, which will answer the question, "if I change this IMS resource, which programs and transactions are affected?". Here, we will see the user benefits from understanding the resources which belong to IMS and the list of all IMS commands used.

IMS DB

IMS stands for Information Management System. It is a hierarchical database. IMS is used to organize and store data items to provide fast and easy access. The data is stored at various levels and each entity depends on a higher one. IMS DB has two main management systems, namely
  • Database Management
  • Transaction Management
The DL/I (Data Language interface) comprises application programs that serve as the interface language that programmers use to access the database by granting access to the data stored in the database. Database management is used for storing, accessing, and managing data in the database, which is the fastest data recovery in its data-organizing manner. To communicate between this database and application programs, IMS uses a transaction manager to interact with the end-user to store and retrieve the data from the database. IMS uses IMS DB to store the data in the backend.

COLLECTING IMS RESOURCES

CICS IA is a tool that helps to collect the IMS resources and its flow of commands. To collect the data, we need resources like programs and transactions. To collect the flow of commands, we need IMS-related commands.

The below sample COBOL code includes the following IMS commands,

Get Functions

Update Functions

Other Functions

Get Unique (GU)

Insert (ISRT)

Checkpoint (CHKP)

Get Next (GN)

Delete (DLET)

Restart (XRST)

Get Next within Parent (GNP)

Replace (REPL)

PCB

Get Hold Unique (GHU)

 

 

Get Hold Next (GHN)

 

 

Get Hold Next within Parent (GHNP)

 

 

 

Users can include DL/I calls inside the Cobol program to communicate with the IMS database. The following DL/I statements are used in COBOL code to access the database,
  • Entry Statement - Used to pass the control from the DL/I to the COBOL program
  • Go back Statement - Used to pass the control back to the IMS control program
  • Call Statement - Used to request DL/I services such as executing certain operations on the IMS DB
 Below is the sample COBOL code for the statements,

Note:

  • PCB Mask - The PCB definition inside the Linkage Section is called PCB Mask. They are used in the entry statement. SELECT, ASSIGN, OPEN, or CLOSE statements are not required.
  • Segment I/O Area - Name of an input/output work area. This is an application program area where the DL/I put a requested segment.
  • CBLTDLI - Cobol to DL/I. Name of an interface module.
  • DLI-Function name (E.g., DLI-GU) – Variable name for declaration.

Steps to collect IMS 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 four 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 configuration page and configure the details which you want to collect and not. There is an option that contains 'Collect IMS resources' should be yes, or no. Give 'Y' for yes.
  • Go to the operation menu page, start the collector, and return to the transaction running page. Run the transaction, which is installed with IMS programs and commands.
  • Go to the operation menu page and stop the collector. The data will be collected during this collection time.
  • 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).
  • Under Usage of command include list option, for IMS, provide Y to ensure yes for collection and press the F5 button to start the command flow collector.
  • Go back to the transaction running page. Run the transaction, which is installed with IMS programs and commands.
  • Run the CINC transaction and press F6 to stop the collector, which displays the data collected.
Thus, the collection of IMS resources and the flow of commands are completed. After the data collection is completed, all the IMS data will be stored in the VSAM file CIUINT4 (Collected IMS data is stored in this file by default transaction CINB) and the GDG file (this file will store collected command flow data).
We should submit a few JCL jobs to perform data transfer from the VSAM file and GDG to the database. The following jobs are to be submitted,

  • 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 IMS RESOURCES IN PLUG-IN

After the data is moved to the database, fetch the collected data by connecting the database to the client side.
Here, we are using the client explorer. Launch the client explorer to open the CICS IA perspective and navigate the host connection tab. Connect with database host connection by providing host details.
Make sure that you have the following details,
  • Host name
  • Port number
  • DB2 Location
  • Schema name
  • User id
  • Password
Press the 'Connect' button. After the successful connection, the CICS IA will be connected to the collected data database. Before making a connection, ensure that the IMS data display option is enabled.
To enable the IMS display option, follow the below steps:
  • Go to the windows menu è click preferences è Select CICS Interdependency Analyzer è Check the IMS checkbox under the additional resource's type to include (Now IMS resources also display).
  • In the toolbar, select 'Resources' under the 'Find' field and click the run button. It will display all the resources under the region present under this connected database.
  • Go to the Queries option under the IA navigation tab and expand the IMS-supplied samples. Run the query which contains IMS resources, and you will get the below data.

Note:

PCB – Program Communication Block, which is the program's view of the database. It defines the DB to be accessed and the scope of the program's access.

Command flow for IMS

To view the flow of commands used in the program by following the steps, follow the below steps:
  •  Go to the user command flow under the IA navigation tab
  •  Expand the option of owner user id until the transaction name is displayed.
  •  Click on the task id and click show visualization to view the different types of command flow, which varies in accordance with the switches
  •  Click show execution to view the overall flow of commands used in that whole transaction

IMS commands in the threadsafe report

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 Threadsafe report and enter the details
  • Check the detailed report checkbox
  • Select the location and provide a name to save it
  • Click ok, and the Threadsafe report gets generated

In the above picture, a list of 4 IMS calls has been taken. These are the IMS commands used to update the CICS functions and created while writing COBOL code.

Thus, IMS resources collection and display with the help of CICS IA which provides the understanding of interrelationships between IMS resources and identifies the flow of IMS commands used in CICS.