Retrieve the current statistics for a single resource, or global statistics for a class of resources.
For statistics relating to the resources URIMAP, PIPELINE,
and WEBSERVICE, see EXTRACT STATISTICS.
COLLECT STATISTICS >>-COLLECT STATISTICS SET(ptr-ref)--+---------------+-----------> '-| last time |-' >--| resource types |------------------------------------------><
Conditions: INVREQ, IOERR, NOTAUTH, NOTFND
last time: |--+-LASTRESET(data-area)----------------+----------------------| '-| hours |--| minutes |--| seconds |-' hours: |--LASTRESETHRS(data-area)--------------------------------------| minutes: |--LASTRESETMIN(data-area)--------------------------------------| seconds: |--LASTRESETSEC(data-area)--------------------------------------|
resource types: |--+-AUTOINSTALL-----------------------------------+------------| +-CONNECTION(data-value)------------------------+ +-CORBASERVER(data-value)--+------------------+-+ | '-BEAN(data-value)-' | +-DB2CONN---------------------------------------+ +-DB2ENTRY(data-value)--------------------------+ +-DISPATCHER------------------------------------+ +-ENQUEUE---------------------------------------+ +-FILE(data-value)------------------------------+ +-JOURNALNAME(data-value)-----------------------+ +-JOURNALNUM(data-value)------------------------+ +-JVMPOOL---------------------------------------+ +-JVMPROFILE(data-value)------------------------+ +-JVMPROGRAM(data-value)------------------------+ +-LSRPOOL(data-value)---------------------------+ +-MONITOR-+--------------+----------------------+ | '-(data-value)-' | +-MVSTCB-+--------------+-----------------------+ | '-(data-value)-' | +-POOL(data-value)--+--------------------+------+ | '-TARGET(data-value)-' | +-PROGAUTO--------------------------------------+ +-PROGRAM-+--------------+----------------------+ | '-(data-value)-' | +-RECOVERY--------------------------------------+ +-REQUESTMODEL(data-value)----------------------+ +-STATS-----------------------------------------+ +-STORAGE-+--------------+----------------------+ | '-(data-value)-' | +-STREAMNAME-+--------------+-------------------+ | '-(data-value)-' | +-SUBPOOL(data-value)---------------------------+ +-SYSDUMPCODE-+--------------+------------------+ | '-(data-value)-' | +-TABLEMGR--------------------------------------+ +-TARGET(data-value)--NODE(data-value)----------+ +-TASKSUBPOOL-----------------------------------+ +-TCLASS(data-value)----------------------------+ +-TCPIP-----------------------------------------+ +-TCPIPSERVICE(data-value)----------------------+ +-TDQUEUE-+--------------+----------------------+ | '-(data-value)-' | +-TERMINAL(data-value)--------------------------+ +-TRANCLASS(data-value)-------------------------+ +-TRANDUMPCODE-+--------------+-----------------+ | '-(data-value)-' | +-TRANSACTION-+--------------+------------------+ | '-(data-value)-' | +-TSQUEUE---------------------------------------+ '-VTAM------------------------------------------'
The COLLECT STATISTICS command returns to the invoking application the current statistics for a particular resource, or overall statistics for the resources of a given type. For example, you can get the statistics for global transaction activity in your CICS system (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 that CICS gives you are those that have been accumulated after the expiry of the last statistics collection interval, end-of-day expiry, or requested reset. (Statistics already written to the SMF data set cannot be accessed.) The COLLECT STATISTICS command does not cause the statistics counters to be reset.
CICS obtains enough storage for the data returned from this command, and returns a pointer to this area. The first two bytes of the area contain its length. This storage can be reused by subsequent COLLECT STATISTICS commands, so you should store elsewhere any data that is required beyond the next issue of the command. CICS releases this storage at task termination.
Table 1 contains Product-sensitive Programming Interface information. See Programming interface information for an explanation of Programming Interface information.
Not all resource types provide both global and specific statistics. Table 1 tells you which statistics are available for each resource type, and gives the copybook name for each set of available statistics. The copybooks define the format of the returned statistics. Where no copybook name is given in the global statistics column, global statistics are not available for the resource type; similarly, where there is no entry in the specific statistics column, you cannot get statistics for an individual resource.
Resource type | Statistic type | Global statistics | Specific statistics |
---|---|---|---|
AUTOINSTALL | Terminal autoinstall | DFHA04DS | - |
BEAN | Enterprise beans | - | DFHEJBDS |
CONNECTION | ISC/IRC system and mode entries | - | DFHA14DS |
CORBASERVER | CorbaServer entries | - | DFHEJRDS |
DB2CONN | DB2 Connection | DFHD2GDS | - |
DB2ENTRY | DB2 Entry | - | DFHD2RDS |
DISPATCHER | Dispatcher | DFHDSGDS | - |
ENQUEUE | Enqueue | DFHNQGDS | - |
FEPI CONNECTION | FEPI Connection | - | DFHA23DS |
FEPI POOL | FEPI Pool | - | DFHA22DS |
FEPI TARGET | FEPI Target | - | DFHA24DS |
FILE | File control | - | DFHA17DS |
JOURNALNAME | Journalname | - | DFHLGRDS |
JOURNALNUM | Journalname | - | DFHLGRDS |
JVMPOOL | JVM pool | DFHSJGDS | - |
JVMPROFILE | JVM profiles | - | DFHSJRDS |
JVMPROGRAM | JVM programs | - | DFHPGRDS |
LSRPOOL | LSR pools | - | DFHA08DS |
MONITOR | Monitor | DFHMNGDS | DFHMNTDS |
MVSTCB | MVS TCB | DFHDSTDS | DFHDSRDS |
PROGAUTO | Program autoinstall | DFHPGGDS | - |
PROGRAM | Program | DFHLDGDS | DFHLDRDS |
RECOVERY | Recovery manager | DFHRMGDS | - |
REQUESTMODEL | Request models | - | DFHIIRDS |
STATS | Statistics | DFHSTGDS | - |
STORAGE | Storage manager (SM) | DFHSMSDS | DFHSMDDS |
STREAMNAME | Log stream | DFHLGGDS | DFHLGSDS |
SUBPOOL | SM domain subpool | - | DFHSMDDS |
SYSDUMPCODE | Dump (system) | DFHSDGDS | DFHSDRDS |
TABLEMGR | Table manager | DFHA16DS | - |
TASKSUBPOOL | SM task subpool | DFHSMTDS | - |
TCLASS | Transaction class | - | DFHXMCDS |
TCPIP | Sockets domain | DFHSOGDS | - |
TCPIPSERVICE | TCP/IP service | - | DFHSORDS |
TDQUEUE | Transient data | DFHTQGDS | DFHTQRDS |
TERMINAL | Terminals | - | DFHA06DS |
TRANCLASS | Transaction class | - | DFHXMCDS |
TRANDUMPCODE | Dump (transaction) | DFHTDGDS | DFHTDRDS |
TRANSACTION | Transaction manager | DFHXMGDS | DFHXMRDS |
TSQUEUE | Temporary storage | DFHTSGDS | |
VTAM | VTAM | DFHA03DS | - |
Copybooks are provided in ASSEMBLER, COBOL, and PL/I. (There is no copybook for C.) The names of the copybooks are the same in each language. You can find them in the following libraries:
ASSEMBLER | CICSTS31.CICS.SDFHMAC |
COBOL | CICSTS31.CICS.SDFHCOB |
PL/I | CICSTS31.CICS.SDFHPL1 |
For further information about these copybooks, see the CICS® Performance Guide.
Because a bean of the same name may exist in multiple CorbaServers, if you specify this option you must also specify CORBASERVER.
To collect statistics for journals defined using the journal numbering convention (for example, for the auto journals defined in file resource definitions), specify the name as DFHnn, where nn is the journal number in the range 01 to 99.
Specifying JOURNALNUM(1) returns statistics for journal DFHJ01. Note that this is not the system log.
Specifying identifiers in the range 1--99 returns statistics for journals DFHJ01--DFHJ99.
When you make changes to application programs that use JOURNALNUM, you are recommended to use the JOURNALNAME option.
When you use the name of a JVM profile anywhere in CICS, you must enter it using the same combination of upper and lower case characters that is present in the HFS file name.
There are two formats for the reset time:
The monitoring performance class must be active for any statistics to be returned. If performance class is not active, the NOTFND condition is returned. For background information on monitoring, see the CICS Performance Guide.
When you use the TCLASS option to request statistics for a class (as opposed to TRANCLASS), a conversion from fullword binary number to 8-character value is made on your behalf (for example, TCLASS(01) becomes the equivalent of TRANCLASS(‘DFHTCL01’)).
CICS provides a sample COLLECT STATISTICS application (DFH0STAT) that makes use of virtually all the options described in this section. This set of programs illustrates ways of using the COLLECT STATISTICS and INQUIRE commands of CICS Transaction Server for z/OS to produce information about a CICS system. The reports include a CICS and MVS storage analysis that can be used as an aid to specifying the DSA LIMIT parameters.
See the CICS Performance Guide for information on installing and operating the DFH0STAT application. The source code for the application can be found in CICSTS31.CICS.SDFHSAMP.
Statistics for Java programs that run in a JVM are collected separately from statistics for other programs, because the JVM programs are not loaded by CICS. CICS does not collect statistics for JVM programs when a COLLECT or PERFORM STATISTICS PROGRAM command is issued; to see them, you need to use the COLLECT or PERFORM STATISTICS JVMPROGRAM command instead.
However, when you browse program names using the INQUIRE PROGRAM command, JVM programs are found. If you have an application that collects statistics for programs by browsing with the INQUIRE PROGRAM command, and then issuing the COLLECT STATISTICS PROGRAM command for the program names that it finds, the application will now receive a "not found" response when it attempts to collect statistics for any JVM programs. (Previously, zeros would have been returned as statistics values for these programs.)
To avoid receiving this response, make the application check the RUNTIME value for each program name that it finds. If the RUNTIME value is JVM, the application should not issue the COLLECT STATISTICS PROGRAM command for that program name. If you want to see the statistics for programs with a RUNTIME value of JVM, you can make the application issue the COLLECT STATISTICS JVMPROGRAM command for those programs. Note that the statistics information that is collected for JVM programs is not the same as that collected for other programs.