Command Flow feature
In this chapter, we look at the CICS Interdependency Analyzer (IA) Command Flow feature. The Command Flow collector was added in CICS IA V3.1 in 2009. It was initially added to help with determining where TCB switches took place in a given task by capturing all CICS, DB2, IMS, and IBM MQ commands in chronological order. It was designed to be used by a single user, a systems programmer, to capture this data for a predefined number of transactions.
Since 2009, the collector has gone through many changes driven by customer requirements (RFEs) and now it can be used for the following purposes:
Be used by multiple users including application developers
Be used by a PRIVILEDGED user to capture data for all user IDs
Capture the TCB switch count after each command
Capture CPU response time between commands
Capture transaction tracking data
Use the transaction and program exclude lists by user
The CICS IA Explorer plug-in has also been enhanced to include:
Visualization across regions
Visualization across TCB switches
Visualization across applications
Search capability in Command Flow execution view
Filtering in Command Flow execution view
Command Flow administration and operation
We now look at how to perform the following functions:
8.1 Administering the Command Flow collector
The Command Flow collector options can be administered from three different places:
The CINT transaction is used to add, remove, and edit the Command Flow user options.
The CINC transaction is used to operate and administer individual Command Flow users.
The CICS IA plug-in can also be used to operate and administer individual Command Flow users.
8.1.1 Adding, editing, and removing Command Flow users
To edit, add, or remove a Command Flow user, select option 4 for “User Administration” from the main CINT menu, as shown in Figure 8-1.
CIU000 CICS Interdependency Analyzer for z/OS - V5R3M0 2015/10/16
Main Administration Menu 11:12:33AM
Select one of the following. Then press Enter.
4 1 Operations Menu.
2 Configure Region Options.
3 Configure Global Options.
4 User Administration.
CICS Sysid: Z538 CICS Applid: IYDZZ538 TermID: TC77
CIU7000I 5655-Y22 (C) Copyright IBM Corp. 2001,2015
F1=Help F2= F3=Exit F4= F5= F6=
F7= F8= F9= F10= F11= F12=Exit
Figure 8-1 CINT user administration
From the User Administration Menu shown in Figure 8-2 you can add, copy, or delete a user. You can also edit the user details.
CIU400 CICS Interdependency Analyzer for z/OS - V5R3M0 2015/10/16
User Administration Menu 11:15:53AM
Type action code then press ENTER. Page : 1 of 1
1=Add User 2=Copy User 3=Delete User 4=User Details
Act USER ID NEW USER STATUS JOURNAL AUTHORITY
AKHODAT INACTIVE CIUMTJNL GENERAL
ARISTO INACTIVE CIUMTJNL GENERAL
CICSUSER INACTIVE CIUMTJNL GENERAL
DOUGANV INACTIVE CIUMTJNL GENERAL
JAMESE INACTIVE CIUMTJNL GENERAL
VNDR69A INACTIVE CIUMTJNL GENERAL
CICS Sysid: Z538 CICS Applid: IYDZZ538 TermID: TC77
F1=Help F2= F3=Exit F4= F5= Refresh F6=
F7=Page Up F8=Page Down F9= F10= F11= F12=
Figure 8-2 Add, copy, delete, edit users
You can use option 4 to edit the user options as shown in Figure 8-3.
CIU440 CICS Interdependency Analyzer for z/OS - V5R3M0 2015/10/16
User Details Menu 11:19:05AM
Options of CINC user JAMESE
CINC Authority . . : GENERAL
Traced transactions IDs. . . . : SSC1
Traced user USERIDs . . . . . : JAMESE
Traced terminal TERMIDs . . . : *
Command flow data ID . . . . . : TEST
Journal name for trace data. . : CIUMTJNL
Dynamic call . . . . . . . . . : Y
User modifiable exit name. . . :
Traced regions APPLIDs . . . . : IYDZZ528
Last data collection statistics
Collector Status . . . . . . . : INACTIVE
Collector last start . . . . . : 2015/08/21 09:41:51AM
Collector last stop. . . . . . : 2015/08/21 09:41:37AM
CICS Sysid: Z538 CICS Applid: IYDZZ538 TermID: TC77
F1=Help F2= F3=Save&Exit F4= F5= Refresh F6=
F7= F8= F9= F10= F11= F12= Cancel
Figure 8-3 Edit the user options
 
As the administrator, you can change the following options:
CINC Authority
Journal name for trace data
CINC Authority
The CINC Authority option is used to control what options are available to the Command Flow user. It has two values:
GENERAL: This value is the default and it allows the Command Flow user to run the collector to capture data for one user ID only. The user ID can be the collector user ID or any other user ID.
PRIVILEDGED: This value allows the Command Flow user to capture data for all user IDs or subset of user IDs defined by a wildcard. This option is equivalent to running the original command flow collector as a single user.
 
Note: Only one PRIVILEDGED collection can be run at one given time. To run a PRIVILEDGED collection for more than one user ID, there can be no other Command Flow runs active.
Journal name for trace data
This option allows you to define individual user journals for a Command Flow user. By default, all the Command Flow data is written to one default logstream as defined by the Journal Mode definition shipped with CICS IA. The default value for this option is CIUMTJNL.
8.1.2 Using CINC to collect Command Flow data
The CICS CINC transaction is used by individual Command Flow users to administer and operate the collection. You can use the various options to control what data you collect.
The following options are available:
Command Flow ID
Traced user USERIDs
Traced terminal TERMIDs
Traced transaction IDs
Exclude lists
Journal Copy Criteria
User Exit Name
Dynamic Call
Tasks before stopping
Records before stopping
You can use the PFKEYS, F4 (to start) and F6 (to stop) the collector.
CIUA01 CICS IA Command Flow Options ApplID IYDZZ538
Command Flow State. . . . : STOPPED
Date/Time of last start . . : 2015/08/21 09:41:51AM
Date/Time of last stop . . : 2015/08/21 09:41:37AM
Command Flow ID. . . . . : TEST
Traced user USERIDs . . . : JAMESE CINC Authority : GENERAL
Traced terminal TERMIDs . . : *
Traced transaction IDs . . : SSC1 (Max 5 transact. IDs)
Exclude lists . . . . . : Transaction Program
User Journal Name . . . . : CIUMTJNL
Journal Copy Criteria. . . : LAST (LAST, USER or CFID)
User Exit Name . . . . . :
Dynamic Call. . . . . . : Y (Y=Yes, N=No)
Tasks before stopping . . : 0 (0-9999)
Records before stopping . . : 0 (0-9999999)
F1=Help F2= F3=Exit F4=Options F5=Start F6=Stop
F7=Stats F8= F9= F10=Applications F11= F12=Cancel
Figure 8-4 CINC Command Flow options
Command Flow ID
This option is the name associated with the Command Flow collection. It can be up to eight characters.
Traced user USERIDs
This option is the CICS user ID for which we capture the data. It is not to be confused with the user ID invoking the collection. In most cases, when the Command Flow is used by application developers, the invoking user ID and the traced user ID will be one in the same. To use generic user IDs, the invoking user must be a PRIVILEDGED user ID. For more information about PRIVILEDGED users, see section “CINC Authority” on page 200.
Traced terminal TERMIDs
You can use this option to capture data for a specific terminal or generic terminals. To capture all terminals, enter an asterisk (*).
 
Traced transaction IDs
You can use these fields to select for which transactions you want to capture data. You can enter up to four transactions or generic transactions. Again, for all transactions you can use an asterisk (*).
Exclude lists
You can use these fields to exclude certain transaction or programs from the data captured. For more information about using exclude lists, see 2.1.3, “Using the IA exclude lists” on page 29.
Journal Copy Criteria
This option is used to define what data is offloaded from the logstream into the GDG data set for each Command Flow user. It has three possible values:
LAST: Copy the last collection for the Command Flow user.
USER: Copy all the records for the Command Flow user.
CFID: Copy only the records based on the Command Flow trace ID.
User Exit Name
This option allows you to enter an eight-character user-modifiable exit name that you can use to add data to a user’s Command Flow records. For more information, see section “The CICS IA Command Flow user exit” in the CICS IA Users Guide, which is in the IBM Knowledge Center:
http://www.ibm.com/support/knowledgecenter/SSPPUS/welcome.html
Dynamic Call
This option allows you to switch on and off the dynamic call option. For more information, see 2.1.5, “Dynamic COBOL calls” on page 39.
The final two options allow you to stop the collector under certain circumstances. This capability was added to allow you to run the Command Flow in a production environment to assist with problem resolution for a given transaction.
Tasks before stopping
The number of tasks executed before stopping the collector. A value of 0 switches the feature off.
Records before stopping
The number of records written to the logstream before stopping the collector. A value of 0 switches the feature off.
 
 
You can collect Command Flow data across CICS regions. The CICS regions must be defined in the CIUCNTL file using the CINT transaction. They need to have an active connection and to get the best value they must share the logstream used to capture the Command Flow data. Use the PFKEY F5 for “Options” to add or remove CICS regions as shown in Figure 8-5.
CIUA02 CICS IA Command Flow ApplID list ApplID IYDZZ538
Press F4 for select the region OR type regions and press ENTER
CICS ApplIDs. . . . . : IYDZZ528
:
:
 
F1=Help F2= F3=Exit F4=Prompt for regions F5=Delete F6=
F7= F8= F9= F10= F11= F12=Cancel
Figure 8-5 Command Flow ApplID list
Use PFKEY F5 to delete an applid.
Use PFKEY F4 to prompt for available regions as shown in Figure 8-6.
CIUA04 List of available CICS regions ApplID IYDZZ538
Select the required region and press F3. More:
CICS CICS CICS CICS CICS CICS
s ApplID s ApplID s ApplID s ApplID s ApplID s ApplID
IYDZZ538 IYDZZ518 IYDZZ528
Figure 8-6 Enter s to select an ApplID
You can also choose to collect CICS TS platform and application data associated with a task when running a Command Flow collection. Use PFKEY F10 to switch on application collection as shown in Figure 8-7.
CIUA0A CICS IA Command Flow Application Data Collection ApplID IYDZZ538
Type Collection Option then press ENTER :
Enable collection of Application Data: N
Selected Application:
ALL.
Figure 8-7 Switch on collection of application data
 
8.1.3 Using the IA plug-in to collect Command Flow data
In the previous section, we looked how the CINC transaction can be used to administer and operate the Command Flow collector. In this section, we look at how we can achieve the same by using the CICS IA plug-in. We configure the collector to collect data for the SSC1 transaction for the default user ID CICSUSER. The collection is performed under the user ID JAMESE.
 
Note: It is important to distinguish between the two user IDs associated with the Command Flow collection. The following two user IDs are used:
Collector or Owner User ID: The user ID running the collection. In this case, JAMESE.
Collected User ID: The user ID for which we are collecting data. In this case, CICSUSER.
The options that are available in the IA plug-in are the same as those options available via the CINC transaction. The options are described in 8.1.2, “Using CINC to collect Command Flow data” on page 200.
The CICS IA plug-in provides the capability to operate and administer the dependency, affinity, and Command Flow collector via a CICS Webservice. Before you can operate the Command Flow collector, you need to log on to the Webservice by using the IA Collection Connection.
Logging on to the IA Collector Connection
The IA Collector Connections are only selectable when you are in the IA Operations view as shown in Figure 8-8 on page 205.
Figure 8-8 IA Operations view
All Explorer connections are available via the Host Connections view. The simplest way to access this view and manage connections is to select the down arrow icon as shown in Figure 8-9.
Figure 8-9 Manage connections
From here, you can do the following actions:
Select Manage Connections to open the Host Connections view
Add a New IA Collector Connection
Select an existing IA Collector Connection
In this case, we select an existing connection called IAOPER.
When adding a new connection, you need to configure the following options:
Name: The local name that you give to this database connection. Use this name to distinguish between different database connections.
Host name: The host name or IP address of the z/OS host system for the interface to the CICS regions for which you want to collect data.
Port number: The port number for the interface to the CICS regions for which you want to collect data.
Secure connection: Select this check box if the connection uses SSL security.
These options are shown in Figure 8-10.
Figure 8-10 IA Collector options
You can now configure the collector options to collect data for transaction SSC1.
Configuring the IA Command Flow collector options
To configure the IA Command Flow option, right-click your user ID in the IA Operations view, and choose Edit collector options as shown in Figure 8-11.
Figure 8-11 Edit collector options for user JAMESE
This action opens an editor view where you can configure your options as shown in Figure 8-12.
Figure 8-12 Set the Command Flow collector options
In this example, we set the following options:
Command Flow ID: COLLSCC1
Trace User ID: CICSUSER
Transaction 1: SSC1
Applid 1: IYDZZ528
Journal Copy Criteria: CFID
After you select your options, you need to save the options by using CTRL+S or by using File  Save from the upper-right corner.
You can now start the collector. Right-click your user ID and select Start Collector as shown in Figure 8-13.
Figure 8-13 Start the Command Flow collector
The status of the collector can be seen in the Properties view as shown in Figure 8-14. To open the Properties view, select Window  Show View  Properties.
Figure 8-14 Command Flow collector options
You can now run the SSC1 transaction and then stop the Command Flow collection. To stop the collector, right-click your user ID and select Stop Collector. The Properties view is updated with the number of records collected. You can now load the Command Flow data.
8.2 Loading the Command Flow data
There are three steps to loading the data into the CICS IA DB2 tables:
1. CIUJLCPY: Extract logstream records to a GDG data set
2. CIUUPDB5: Load the data into DB2 from the GDG data set
3. CIUJLDEL: Delete the loaded data from the logstream
The sample job CIUJLCPY extracts records from the logstream based on the Command Flow collector options for the collecting user ID, in our case JAMESE. The sample JCL for CIUJLCPY is shown in Figure 8-15.
//*---------------------------------------------------------------
//* COPY RECORDS FROM LOG STREAM DATA SETS TO GDG QSAM FILE
//*---------------------------------------------------------------
// SET USERID=&SYSUID @M6A
//STEP010 EXEC PGM=CIUU044,PARM='&USERID' @M6C
//STEPLIB DD DSN=ANTZ.CICS.IA.DEV.BSF.SCIULOAD,
// DISP=SHR
// DD DSN=ANTZ.CICS.IA.DEV.BSF.SCIULODE,
// DISP=SHR
//SYSOUT DD SYSOUT=*
//CIUPRINT DD SYSOUT=*
//CIUCNTL DD DSN=CICSIA53.V10.CIUCNTL,DISP=SHR @M8A
//JNLINPUT DD DSNAME=CICSIA53.V10.CIUMTJNL,
// DCB=(BLKSIZE=32760),
// SUBSYS=(LOGR,DFHLGCNV)
//CIUCMDTR DD DSNAME=CICSIA53.V10.&USERID..CIUCMDFL(+1), @M6C
// DISP=(NEW,CATLG),
//* DATACLAS=_smsdatac_,
//* STORCLAS=_smsstorc_,
//* MGMTCLAS=_smsmngc_,
// UNIT=SYSDA,SPACE=(CYL,(5,5),RLSE),
// DCB=(RECFM=FB,LRECL=807,BLKSIZE=31473) @R100506C
Figure 8-15 JCL for the CIUJLCPY job
You see that the user ID running the extract job is passed as a parameter in to program CIUU040. This program reads the user record from the CIUCNTL file and obtains the Journal Copy Criteria to be used to select the records to be extracted. If the user ID running the extract job is different from the collector user ID, use the // SET USERID= statement to set the user ID to the collector user ID.
In our case, the collector user ID and the user ID submitting the job is JAMESE. The Journal Copy Criteria used for this collection is CFID as shown in Figure 8-14 on page 210. This option implies that we extract all the data with a collection ID that matches the selected collection ID, in our case COLLSSC1 for user ID JAMESE. The other options for Journal Criteria Copy options are described in “Journal Copy Criteria” on page 202.
The sample job CIUJLCPY should complete with RC=0 and the output file CIUPRINT should include extract details as shown in Figure 8-16.
CIU6019I Journal records read = 000006617
CIU6020I Trace records written = 000000275
Figure 8-16 Extract report for job CIUJLCPY
After running job CIUJLCPY, you need to run job CIUUPDB5 to load the database. This job takes as input the GDG data set that was updated in the previous job. Again, you can use the // SET USERID= statement to set the user ID to the collector user ID.
You should now have Command Flow data available for analysis.
8.3 Analyzing the Command Flow data
The Command Flow collections that we collected are available from the User Command Flow branch in the IA Navigation view as shown in Figure 8-17. They are listed by Owner User ID (Collector User ID), followed by Collection ID name, followed by the collected user ID, followed by the time stamp and the task ID.
You use the data collected in the previous section. You can see from Figure 8-17 that the owner user ID is JAMESE, the collection ID is COLLSSC1, and the collected user ID is CICSUSER.
Figure 8-17 User command flows
There are two methods of viewing the command flow data for a task:
The Execution view
The Visualization views
8.3.1 The Command Flow Execution view
Right-click the required task and select Show Execution as shown in Figure 8-18.
Figure 8-18 Show Execution option
This action opens the Command Flow view as shown in Figure 8-19.
Figure 8-19 Command Flow execution view
This view is historically broken down into three parts:
TCB Modes Used: The command execution count by TCB mode
TCB Mode Switches: The command count causing a TCB mode switch
The execution tree: The command execution tree
The Command Flow collector was originally designed to assist with CICS threadsafe analysis and as you can see the default view is designed as such. In this section, we focus on the execution part of the view and how we can modify the view for use by application developers. The threadsafe aspects of this view are covered in 5.4, “Using the command flow data to analyze TCB swaps” on page 135.
The default execution view lists the commands used by the transaction, then the initial program, then the commands. Indentation is used to show when one program LINKs, XCTLs, or CALLs another program. These features are shown in Figure 8-20.
Figure 8-20 Command Flow execution
We now look at other features that are available in the Command Flow view:
Customize the columns shown in the view
Use the filter options
Use the FIND command
Customizing columns
To customize the columns, select the Column Menu in the upper-right menu bar and select Customize columns as shown in Figure 8-21.
Figure 8-21 Customize columns
We remove the TCB columns as shown in Figure 8-22.
Figure 8-22 Remove TCB columns
You then add the following columns as shown in Figure 8-23 on page 216:
Command
Resource type
Resource name
Response Code
Reason Code
Figure 8-23 Add new columns
Our execution view now contains data that could be used by an application developer as shown in Figure 8-24.
Figure 8-24 An application developer’s view of the Command Flow execution
This view can be saved for future use by saving the perspective using Window  Save Perspective As as shown in Figure 8-25.
Figure 8-25 Save perspective
You can then replace your existing IA perspective or create a new one as shown in Figure 8-26 on page 218.
Figure 8-26 Create a CICS IA Developer perspective
Filtering data
To filter the data shown in the execution view, select the Show Filters icon in the upper-right menu bar as shown Figure 8-27.
Figure 8-27 Show Filters icon
The filter list appears on the right side of the view and you can filter on the resource type or the command, as shown in Figure 8-28.
Figure 8-28 Filtering options
You now use the filtering to show only PROGRAM resources. First, clear the “All resources” box shown in Figure 8-28. Then, select the PROGRAM resource as shown in Figure 8-29.
Figure 8-29 PROGRAM flow in the execution tree
This view gives you a display of the program flow within the execution tree as shown in Figure 8-29.
Using the Find feature
To demonstrate this feature, you collapse the Execution view as shown in Figure 8-30.
Figure 8-30 Collapsed Execution view
You then enter CTRL+F from within the Execution view. This action opens the Find window that is shown in Figure 8-31.
Figure 8-31 Find window
You can search on resource type, resource name, and so on. In this example, we search for a DB2 TABLE. Pressing Find causes the Execution view to expand and highlight the command containing a DB2 table, as shown in Figure 8-32 on page 221.
Figure 8-32 FIND a command containing a DB2 TABLE
8.3.2 Command Flow visualization
You can choose to analyze your Command Flow data using new graphical visualization added in CICS IA V5.2. We provide three different types of visualization:
Application switches: Shows the execution across CICS applications
Region switches: Shows the execution across CICS regions
TCB switches: Shows the execution across TCB modes
In this example, we show the execution across TCB switches.
Right-click the required task and select Visualization  TCB Switches as shown in Figure 8-33.
Figure 8-33 Select visualization by TCB switches
This action opens the Command Flow Diagram view as shown in Figure 8-34.
Figure 8-34 Command flow across TCB modes
In the example that is shown in Figure 8-34, you can see that the flow goes over to the L8 TCB to execute the DB2 command.
For the preceding example, we also used the orientation icon to change the orientation to vertical as shown in Figure 8-35.
Figure 8-35 Change to vertical orientation
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset