Writing a program to collect CICS statistics

Background information

CICS® statistics contain information about the CICS system as a whole--for example, its performance and usage of resources. Statistics data is therefore useful both for performance tuning and for capacity planning.

Statistics are collected during CICS online processing for later offline analysis. The statistics domain writes statistics records to a System Management Facility (SMF) data set. The records are of SMF type 110, subtype 0002. 15

Statistics records are also written by:

CICS produces five types of statistics: interval, end-of-day, requested, requested reset, and unsolicited.

Important

For detailed information about the types of CICS statistics, when they are collected, and how to control their collection, see the CICS Performance Guide.

Resetting statistics counters

Statistics counters are reset in the following circumstances:

However, you can cause statistics counters to be reset without writing records to the SMF data set. You do this by changing the statistics recording status, using either of the commands:

Thus, a user program can reset all statistics counters by issuing an EXEC CICS SET STATISTICS RESETNOW command.

Note that it is valid to specify the RESETNOW option only when there is a genuine change of recording status. For example, coding EXEC CICS SET STATISTICS ON RESETNOW when STATISTICS is already set ON causes an error response.

Important

Statistics counters are reset in various ways. Specific counters may be reset to:

For information about the resetting of specific statistics counters, refer to the CICS Performance Guide.

Using the EXEC CICS COLLECT and EXTRACT STATISTICS commands

The statistics collected by CICS are written to an SMF data set. However, a user program can use the EXEC CICS COLLECT STATISTICS Start of changeand EXEC CICS EXTRACT STATISTICS commandsEnd of change to collect the current statistics for a particular resource, or overall statistics for the resources of a particular type. For example, you can get the statistics for global transaction activity in your CICS region (such as the total number of transactions attached), or you can specify a single transaction that you are interested in (such as CEMT). The statistics are returned to the invoking application. For programming information about the EXEC CICS COLLECT STATISTICS Start of changeand EXEC CICS EXTRACT STATISTICS commandsEnd of change, see the CICS System Programming Reference manual.

CICS supplies eleven sample programs that show how you can use the EXEC CICS COLLECT STATISTICS, Start of changeEXEC CICS EXTRACT STATISTICS,End of change and EXEC CICS INQUIRE commands to produce a useful analysis of a CICS system. These are:

The sample programs produce a report showing critical system parameters from the CICS dispatcher, together with loader statistics and an analysis of the CICS storage manager. DFH$STAS, DFH$STCN, and DFH$STTB are provided in assembler language; the other eight programs are provided in COBOL.

For information about installing and operating the sample statistics programs, and about the data produced by the programs, see the CICS Performance Guide.

Related tasks
Processing the output from CICS statistics
Related reference
CICS statistics record format
Using an XSTOUT global user exit program to filter statistics records

15.
Monitoring records, and statistics records produced by the temporary storage shared-queue server, are also written to the SMF data set as type 110 records. (Some journaling type 110 records can be written there, too.) You might find it useful to process the statistics records and the monitoring records together, because statistics provide resource and system information that is complementary to the transaction data produced by CICS monitoring.

[[ Contents Previous Page | Next Page Index ]]