Introduction to CICS statistics

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

The CICS statistics domain writes statistics records to a System Management Facilities (SMF) data set. The records are of SMF type 110, subtype 002. Monitoring records and some journaling records are also written to the SMF data set as type 110 records. You might find it useful to process statistics and monitoring records together.

The global and specific, or resource, statistics for each resource type are each mapped by a different DSECT. Programming information about the formats of CICS statistics records is given in Writing statistics collection and analysis programs.

Interval statistics

Interval statistics are gathered by CICS during a specified interval. You can change the interval value by using the STATINT system initialization parameter. CICS writes the interval statistics to the SMF data set automatically at the expiry of the interval if any of the following conditions are satisfied:
  • Statistics recording status was set to ON by the STATRCD system initialization parameter (and has not then been set to OFF by a EXEC CICS SET STATISTICS RECORDING command). The default is STATRCD=OFF.
  • The RECORDING option of the EXEC CICS SET STATISTICS command is set to ON.

End-of-day statistics

End-of-day statistics are a special case of interval statistics where all statistics counters are collected and reset. There are three ways to get end-of-day statistics:
  • The end-of-day expiry time
  • When CICS quiesces (normal shutdown)
  • When CICS terminates (immediate shutdown)

The end-of-day value defines a logical point in the 24 hour operation of CICS. The default end-of-day value is 000000 (midnight). Change the end-of-day value by using the STATEOD system initialization parameter, or using the EXEC CICS SET STATISTICS command.

End-of-day statistics are always written to the SMF data set, regardless of the settings of any of the following items:
  • The system initialization parameter, STATRCD
  • The RECORDING option of EXEC CICS SET STATISTICS.
The statistics that are written to the SMF data set are the statistics collected since the last event that involved a reset. The following are examples of resets:
  • At CICS startup
  • Issue of RESETNOW RECORDNOW or EXEC CICS STATISTICS commands
  • Interval statistics

Requested statistics

Requested statistics are produced by using one of the following commands:

These commands cause the statistics to be written to the SMF data set immediately, instead of waiting for the current interval to expire. The PERFORM STATISTICS command can be issued with any combination of resource types, or you can ask for all resource types with the ALL option.

Requested reset statistics

Requested reset statistics differ from requested statistics in that all statistics are collected and statistics counters are reset. You can reset the statistics counters using the following commands:

The PERFORM STATISTICS command must be issued with the ALL option if RESETNOW is present.

You can also invoke requested reset statistics when changing the recording status from ON to OFF, or from OFF to ON, using EXEC CICS SET STATISTICS ON|OFF RECORDNOW RESETNOW. It is valid to specify the RECORDNOW RESETNOW options only when there is a genuine change of status from STATISTICS ON to OFF, or from OFF to ON. In other words, coding EXEC CICS SET STATISTICS ON RECORDNOW RESETNOW when statistics recording is already ON causes an error response.

Using the SET STATISTICS RESETNOW command causes the loss of the statistics data that has been collected since the last interval. Interval collections take place only if you set the RECORDING status to ON. To set the statistics recording status to ON or OFF, use either the RECORDING option on this command or the STATRCD system initialization parameter. Statistics are always written, and counts reset, at the end of day.

The following figure summarizes the statistics reset functions.
Figure 1. Summary of statistics reset functions
Counters can be reset by any of the following events: When the INTERVAL expires, if the statistics recording status is set to ON, statistics are written to the SMF data set, and the counters are reset. When you issue a PERFORM STATISTICS command, statistics are written to the SMF data set, and counters are only reset if ALL and RESETNOW are specified. When ENDOFDAY expires, statistics are written to the SMF data set, and the counters are reset.

Unsolicited statistics

Unsolicited statistics are automatically gathered by CICS for dynamically allocated and deallocated resources. CICS writes these statistics to SMF just before the resource is deleted, regardless of the status of statistics recording.

To ensure that accurate statistics are recorded, unsolicited statistics (USS) must be collected. An unsolicited record resets the statistics fields it contains. In particular, during a normal CICS shutdown, files are closed before the end-of-day statistics are gathered. Closing files before the end-of-day statistics are gathered means that file and LSRpool end-of-day statistics are zero, while the correct values are recorded as unsolicited statistics.

Unsolicited statistics are produced for the following resources:
Atom feeds
Whenever an ATOMSERVICE resource definition is discarded, CICS collects the statistics for that resource covering the period from the last interval.
Autoinstalled terminals
Whenever an autoinstalled terminal entry in the TCT is deleted (after the terminal logs off), CICS collects statistics covering the autoinstalled period since the last interval. The period covers any delay interval specified by the AILDELAY system initialization parameter.

If an autoinstalled terminal logs on again before the expiry of the delay interval, the accumulation of statistics continues until the next interval. At that interval, the accumulation of statistics is restarted.

CAPTURESPEC resources
Whenever a CAPTURESPEC resource definition is discarded, CICS collects the statistics for that resource covering the period from the last interval.
DBCTL
Whenever CICS disconnects from DBCTL, CICS collects the statistics covering the whole of the DBCTL connection period.
Db2®
Whenever CICS disconnects from Db2, CICS collects the statistics for the Db2 connection and all DB2ENTRY resources covering the period from the last interval.

Whenever a DB2ENTRY is discarded, CICS collects the statistics for that DB2ENTRY covering the period from the last interval.

DOCTEMPLATE resources
Whenever a document template is discarded, CICS collects the statistics for that template covering the period from the last interval.
EPADAPTER resources
When an EPADAPTER resource is disabled, CICS collects the statistics for that resource covering the period from the last interval.
EVENTBINDING resources
Whenever an EVENTBINDING resource definition is discarded, CICS collects the statistics for that resource covering the period from the last interval.
FEPI connection
Unsolicited connection statistics are produced when a connection is destroyed.
FEPI pools
Unsolicited pool statistics are produced when a pool is discarded by using the DISCARD POOL or DELETE POOL command.
FEPI targets
Unsolicited target statistics are produced when a target is destroyed or removed from a pool.
Files
Whenever CICS closes a file, CICS collects statistics covering the period from the last interval.
IPCONN resources
Whenever an IPIC connection is discarded, CICS collects the statistics for that IPCONN resource covering the period from the last interval.
Journalnames
Unsolicited journalname statistics are produced when a JOURNALNAME resource is discarded.
JVMSERVER resources
When a JVMSERVER resource is disabled, CICS collects the statistics for that resource covering the period from the last interval.
LIBRARY resources
Whenever a LIBRARY resource is disabled, CICS collects the statistics for that definition covering the period from the last interval.
Logstreams
Unsolicited logstream statistics are produced when the logstream is discarded from the MVS™ system logger.
LSR pools
When CICS closes a file that is in an LSR pool, CICS collects the statistics for the LSR pool. The following peak values are reset at each interval collection:
  • Peak number of requests waiting for a string
  • Maximum number of concurrent active file control strings

The other statistics, which are not reset at an interval collection, cover the entire period from the time the LSR pool is created (when the first file is opened) until the LSR pool is deleted (when the last file is closed).

MQCONN resources
Whenever a WebSphere® MQ connection is disconnected, CICS collects the statistics for that MQCONN resource covering the period from the last interval.
NODEJSAPP resources
Whenever a NODEJSAPP resource is discarded, CICS collects the statistics for that NODEJSAPP resource covering the period from the last interval.
PIPELINE resources
Whenever a PIPELINE resource definition is discarded, CICS collects the statistics for that resource covering the period from the last interval.
Policies
Whenever a policy is discarded, CICS collects the statistics for that policy covering the period from the last interval.
PROGRAM resources
When an installed program is discarded, CICS collects the statistics covering the installed period since the last interval.
Program definitions
When an installed PROGRAM resource definition is discarded, CICS collects the statistics covering the installed period since the last interval.
TCP/IP Services
Whenever CICS closes a TCP/IP service, CICS collects the statistics covering the period since the last interval.
Transactions
When an installed TRANSACTION resource definition is discarded, CICS collects the statistics covering the installed period since the last interval.
Transaction classes
When an installed transaction class definition is discarded, CICS collects the statistics covering the installed period since the last interval.
Transient data queues
Unsolicited transient data queue statistics are produced when a transient data queue is discarded or when an extrapartition transient data queue is closed.
URIMAP resources
Whenever a URIMAP resource definition is discarded, CICS collects the statistics for that resource covering the period from the last interval.
WEBSERVICE resources
Whenever a WEBSERVICE resource definition is discarded, CICS collects the statistics for that resource covering the period from the last interval.
XMLTRANSFORM resources
Whenever an XMLTRANSFORM resource definition is discarded, CICS collects the statistics for that resource covering the period from the last interval.

Statistics for private resources for applications deployed on platforms

For resource types that are supported as private resources for applications deployed on platforms, separate statistics records are written for the public resources and for the private resources, each mapped by a different DSECT.

When you use the EXEC CICS PERFORM STATISTICS RECORD command to write resource statistics, use the same resource type keyword whether the resource is public or private. If a resource is a public resource, the public DSECT is used to map its data, and if a resource is a private resource, the private DSECT is used to map its data.

When you use the EXEC CICS EXTRACT STATISTICS or EXEC CICS COLLECT STATISTICS command to request resource statistics for a specific resource of a resource type that is supported as a private resource, the command operates according to the context in which the task is running.
  • If the command is issued from a public program, statistics are returned for the named public resource.
  • If the command is issued from a program that is part of an application deployed on a platform, so is running with an application context, the private resources for the application are searched first for the named resource. If a private resource is not found, statistics are returned for the named public resource.
  • For the EXEC CICS EXTRACT STATISTICS command only, you can specify a different application context to be searched for private resources. When you request statistics for a different application, if a private resource is not found for that application, no statistics are returned.

Programs that are declared as application entry points are identified by a field in the DSECTs for public and private program definitions (PROGRAMDEF statistics keyword) and JVM programs (JVMPROGRAM keyword). When interval statistics, end-of-day statistics, requested statistics, requested reset statistics, or unsolicited statistics are produced for a program definition or JVM program that is declared as an application entry point, two statistics records are written, one mapped by the DSECT for public resources, and one mapped by the DSECT for private resources. For the program statistics that are produced by the loader domain (PROGRAM keyword), application entry points are not identified, and only one private program statistics record is written.

When you use the EXEC CICS EXTRACT STATISTICS or EXEC CICS COLLECT STATISTICS command to return statistics for a specified program that is declared as an application entry point, only one statistics record is returned. If the command is issued in or for an application context, and the program was defined as a private resource for the application, the DSECT for private resources is used to format the data, even if the program has currently been promoted to a public program in order to make the application entry point available.