EXTRACT STATISTICS

Retrieve the current statistics for a single resource, or global statistics for a class of resources.

The EXTRACT STATISTICS command can be used to obtain statistics for all CICS® resource types except AUTOINSTALL, CONNECTION, FEPI CONNECTION, FEPI POOL, FEPI TARGET, JOURNALNUM, TABLEMGR, TCLASS, TERMINAL and VTAM for which the COLLECT STATISTICS command must be used.

Extract STATISTICS

Read syntax diagramSkip visual syntax diagramEXTRACT STATISTICSRESTYPE( cvda)RESID( data-area)RESIDLEN( data-value)subrestypeapplcontext SET( ptr-ref) last time
subrestype
Read syntax diagramSkip visual syntax diagramSUBRESTYPE( cvda)SUBRESID( data-area)SUBRESIDLEN( data-value)
applcontext
Read syntax diagramSkip visual syntax diagramAPPLICATION(data-value)APPLMAJORVER(data-value)APPLMINORVER(data-value)APPLMICROVER(data-value)PLATFORM(data-value)
last time
Read syntax diagramSkip visual syntax diagramLASTRESET( data-area)hoursminutesseconds
hours
Read syntax diagramSkip visual syntax diagramLASTRESETHRS( data-area)
minutes
Read syntax diagramSkip visual syntax diagramLASTRESETMIN( data-area)
seconds
Read syntax diagramSkip visual syntax diagramLASTRESETSEC( data-area)

Conditions: APPNOTFOUND, INVREQ, IOERR, LENGERR, NOTAUTH, NOTFND

Start of changeThis command is threadsafe.End of change

Description

The EXTRACT STATISTICS command returns to the invoking application the current statistics for a particular resource, or global statistics for the resources of a given type.

The statistics that CICS returns are those that have been accumulated after the expiry of the last statistics extraction interval, end-of-day expiry, or requested reset. Statistics already written to the SMF data set cannot be accessed. The EXTRACT 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 EXTRACT STATISTICS commands, so you must store elsewhere any data that is required beyond the next issue of the command. CICS releases this storage at task termination.

Start of changeFor resource types that are supported as private resources for applications deployed on platforms, different statistics records are written for public resources and for private resources, each mapped by a different copybook, or DSECT. LIBRARY, JVMPROGRAM, PROGRAM, and PROGRAMDEF resource types are supported as private resources. If a resource is a public resource, the public copybook is used to map its data, and if a resource is a private resource, the private copybook is used to map its data.End of change

Start of changeWhen 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.
End of change

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.

Not all resource types provide both global and specific, or resource, statistics. Table 1 tells you which statistics are available for each resource type and gives the copybook, or DSECT, 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 unavailable for the resource type. Where the specific, or resource, statistics column contains no entry, you cannot get statistics for an individual resource.
Table 1 contains Product-sensitive Programming Interface information.
Table 1. Resource types and statistics
Resource type CVDA RESIDLEN Statistic type Global statistics Specific statistics
ATOMSERVICE 1179 8 ATOMSERVICE DFHW2RDS
BUNDLE 1180 8 BUNDLE DFHRLRDS
Start of changeDB2CONNEnd of change Start of change1142End of change Start of changeEnd of change Start of changeDB2CONNEnd of change Start of changeDFHD2GDSEnd of change Start of changeEnd of change
Start of changeDB2ENTRY End of change Start of change1144End of change Start of change8End of change Start of changeDB2ENTRY End of change Start of changeEnd of change Start of changeDFHD2RDSEnd of change
Start of changeDISPATCHEREnd of change Start of change1144End of change Start of changeEnd of change Start of changeDISPATCHEREnd of change Start of changeDFHDSGDSEnd of change Start of changeEnd of change
DOCTEMPLATE 1145 8 DOCTEMPLATE DFHDHDDS
EPADAPTER 1196 32 EPADAPTER DFHEPRDS
Start of changeENQUEUEEnd of change Start of change1146End of change Start of changeEnd of change Start of changeENQUEUEEnd of change Start of changeDFHNQGDSEnd of change Start of changeEnd of change
EVENTBINDING 1191 32 EVENTBINDING DFHECGDS DFHECRDS
CAPTURESPEC subresource type 1195 32 EVENTBINDING DFHECCDS
EVENTPROCESS 1192 EVENTPROCESS DFHEPGDS
Start of changeFILEEnd of change Start of change238End of change Start of change8End of change Start of changeFILEEnd of change Start of changeEnd of change Start of changeDFHA17DSEnd of change
IPCONN 1176 8 IPCONN DFHISRDS
Start of changeJOURNALNAMEEnd of change Start of change1147End of change Start of change8End of change Start of changeJOURNALNAMEEnd of change Start of changeEnd of change Start of changeDFHLGRDSEnd of change
Start of changeJVMPROGRAMEnd of change Start of change1151End of change Start of change8End of change Start of changeJVMPROGRAMEnd of change Start of changeEnd of change Start of change
DFHPGRDS (public)
DFHPGPDS (private
End of change
JVMSERVER 1193 8 JVMSERVER DFHSJSDS
LIBRARY 1177 8 LIBRARY
DFHLDBDS (public)
DFHLDYDS (private
Start of changeLSRPOOLEnd of change Start of change1152End of change Start of change4End of change Start of changeLSRPOOLEnd of change Start of changeEnd of change Start of changeDFHA08DSEnd of change
Start of changeMONITOREnd of change Start of change1153End of change Start of change4End of change Start of changeMONITOREnd of change Start of changeDFHMNGDSEnd of change Start of changeDFHMNTDSEnd of change
MQCONN 1175 MQCONN DFHMQGDS
Start of changeMVSTCBEnd of change Start of change1154End of change Start of change4End of change Start of changeMVSTCBEnd of change Start of changeDFHDSTDSEnd of change Start of changeDFHDSRDSEnd of change
PIPELINE 1124 8 PIPELINE DFHPIRDS
Start of changePROGAUTOEnd of change Start of change1072End of change Start of changeEnd of change Start of changePROGAUTOEnd of change Start of changeDFHPGGDSEnd of change Start of changeEnd of change
Start of changePROGRAMEnd of change Start of change154End of change Start of change8End of change Start of changePROGRAMEnd of change Start of changeDFHLDGDSEnd of change Start of change
DFHLDRDS (public)
DFHLDPDS (private
End of change
PROGRAMDEF 1178 8 PROGRAMDEF
DFHPGDDS (public)
DFHPGEDS (private
Start of changeRECOVERYEnd of change Start of change1156End of change Start of changeEnd of change Start of changeRECOVERYEnd of change Start of changeDFHRMGDSEnd of change Start of changeEnd of change
Start of changeSTATSEnd of change Start of change1158End of change Start of changeEnd of change Start of changeSTATSEnd of change Start of changeDFHSTGDSEnd of change Start of changeEnd of change
Start of changeSTORAGEEnd of change Start of change1159End of change Start of change8End of change Start of changeSTORAGEEnd of change Start of changeDFHSMSDSEnd of change Start of changeDFHSMDDSEnd of change
Start of changeSTREAMNAMEEnd of change Start of change1160End of change Start of change26End of change Start of changeSTREAMNAMEEnd of change Start of changeDFHLGGDSEnd of change Start of changeDFHLGSDSEnd of change
Start of changeSUBPOOLEnd of change Start of change1161End of change Start of change8End of change Start of changeSUBPOOLEnd of change Start of changeEnd of change Start of changeDFHSMDDSEnd of change
Start of changeSYSDUMPCODEEnd of change Start of change1162End of change Start of change8End of change Start of changeSYSDUMPCODEEnd of change Start of changeDFHSDGDSEnd of change Start of changeDFHSDRDSEnd of change
Start of changeTASKSUBPOOLEnd of change Start of change1164End of change Start of changeEnd of change Start of changeTASKSUBPOOLEnd of change Start of changeDFHSMTDSEnd of change Start of changeEnd of change
Start of changeTCPIPEnd of change Start of change1165End of change Start of changeEnd of change Start of changeTCPIPEnd of change Start of changeDFHSOGDSEnd of change Start of changeEnd of change
Start of changeTCPIPSERVICEEnd of change Start of change1166End of change Start of change8End of change Start of changeTCPIPSERVICEEnd of change Start of changeEnd of change Start of changeDFHSORDSEnd of change
Start of changeTDQUEUEEnd of change Start of change1167End of change Start of change4End of change Start of changeTDQUEUEEnd of change Start of changeDFHTQGDSEnd of change Start of changeDFHTQRDSEnd of change
Start of changeTRANCLASSEnd of change Start of change1169End of change Start of change8End of change Start of changeTRANCLASSEnd of change Start of changeEnd of change Start of changeDFHXMCDSEnd of change
Start of changeTRANDUMPCODEEnd of change Start of change1170End of change Start of change4End of change Start of changeTRANDUMPCODEEnd of change Start of changeDFHTDGDSEnd of change Start of changeDFHTDRDSEnd of change
Start of changeTRANSACTIONEnd of change Start of change1171End of change Start of change4End of change Start of changeTRANSACTIONEnd of change Start of changeDFHXMGDSEnd of change Start of changeDFHXMRDSEnd of change
Start of changeTSQUEUEEnd of change Start of change1172End of change Start of changeEnd of change Start of changeTSQUEUEEnd of change Start of change DFHTSGDSEnd of change Start of changeEnd of change
URIMAP 1173 8 URIMAP DFHWBGDS DFHWBRDS
WEBSERVICE 1174 32 WEBSERVICE DFHPIWDS
XMLTRANSFORM 1194 32 XMLTRANSFORM DFHMLRDS

Copybooks are provided in ASSEMBLER, C, COBOL, and PL/I.

The names of the copybooks are the same in each language. You can find them in the following libraries:

Language Library
ASSEMBLER CICSTS52.CICS.SDFHMAC
C CICSTS52.CICS.SDFHC370
COBOL CICSTS52.CICS.SDFHCOB
PL/I CICSTS52.CICS.SDFHPL1
Note: Some of the copybooks contain packed fields. Before these fields are used, check them for hexadecimal zeros. The COBOL versions of the fields have been redefined as numeric with a suffix of -R for this purpose.

For further information about these copybooks, see Introduction to CICS statistics.

Options

Start of changeAPPLICATION(data-value)End of change
Start of change Specifies the application name element of the application context. The application name can be up to 64 characters in length.

Specify the application context to return statistics for a private resource that is part of an application deployed on a platform. Statistics for private resources can only be returned as specific, or resource, statistics for a named resource of the JVMPROGRAM, LIBRARY, PROGRAM, or PROGRAMDEF resource types, which are supported as private resources. You must specify a complete application context, including the platform name, application name, and full application version number. If the private resource that you name on the RESID option is not found in the specified application context, no statistics are returned.

You do not need to specify an application context if the command is issued from a program that is part of the relevant application. By default, CICS returns statistics for a private resource from the application where the command is issued, or statistics for a public resource if no private resource can be found.

End of change
Start of changeAPPLMAJORVER(data-value)End of change
Start of change Specifies the application major version element of the application context, in fullword binary form. End of change
Start of changeAPPLMINORVER(data-value)End of change
Start of change Specifies the application minor version element of the application context, in fullword binary form. End of change
Start of changeAPPLMICROVER(data-value)End of change
Start of change Specifies the application micro version element of the application context, in fullword binary form. End of change
LASTRESET(data-area)
Returns a 4-byte packed decimal field giving the time at which the counters for the requested statistics were last reset. This time is usually when the last interval expired. The last reset time is always returned in local time.
The reset time has two formats:
  • A composite format (packed decimal format 0hhmmss+), which you obtain by using the LASTRESET option.
  • Separate hours, minutes, and seconds, which you obtain by specifying the LASTRESETHRS, LASTRESETMIN, and LASTRESETSEC options respectively.
LASTRESETHRS(data-area)
Returns a fullword binary field giving the hours component of the time at which the counters for the requested statistics were last reset; see the LASTRESET option.
LASTRESETMIN(data-area)
Returns a fullword binary field giving the minutes component of the time at which the counters for the requested statistics were last reset; see the LASTRESET option.
LASTRESETSEC(data-area)
Returns a fullword binary field giving the seconds component of the time at which the counters for the requested statistics were last reset; see the LASTRESET option.
Start of changePLATFORM(data-value)End of change
Start of change Specifies the platform name element of the application context. The platform name can be up to 64 characters in length. End of change
RESTYPE(cvda)
Requests statistics for a particular resource type depending on the CVDA value supplied. Valid CVDA values are as follows:
ATOMSERVICE
Request statistics for an ATOMSERVICE resource; RESID identifies the particular ATOMSERVICE resource definition.
BUNDLE
Request statistics for a BUNDLE resource; RESID identifies the particular BUNDLE resource definition.
Start of changeDB2CONNEnd of change
Start of changeRequest statistics for the CICS DB2 connection including information for pool threads and command threads.End of change
Start of changeDB2ENTRYEnd of change
Start of changeRequest statistics for a DB2ENTRY; RESID identifies the particular DB2ENTRY.End of change
Start of changeDISPATCHEREnd of change
Start of changeRequest statistics for the dispatcher domain.End of change
DOCTEMPLATE
Request statistics for a document template; RESID identifies the particular DOCTEMPLATE resource definition.
Start of changeENQUEUEEnd of change
Start of changeRequest statistics for enqueue requests.End of change
EPADAPTER
Request statistics for an EPADAPTER resource; RESID identifies the particular EPADAPTER resource definition.
EVENTBINDING
Request statistics for a particular EVENTBINDING resource; RESID identifies the particular EVENTBINDING resource definition.
EVENTPROCESS
Request global statistics on the event processing domain.
Start of changeFILEEnd of change
Start of changeRequest statistics for a file. RESID identifies the particular file definition.End of change
IPCONN
Request statistics for an IPCONN resource; RESID identifies the particular IPCONN resource definition.
Start of changeJOURNALNAMEEnd of change
Start of changeRequest statistics for a CICS journal. RESID identifies the particular journal. 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 DFHJnn, where nn is the journal number in the range 01 - 99.
Note: Specifying DFHJ01 returns statistics written to a user journal of that name, not the system log.
End of change
Start of changeJVMPROGRAMEnd of change
Start of changeRequest statistics for a Java program. RESID identifies the particular PROGRAM resource definition.End of change
JVMSERVER
Request statistics for a JVMSERVER resource; RESID identifies the particular JVMSERVER resource definition.
LIBRARY
Request statistics for a LIBRARY resource; RESID identifies the particular LIBRARY resource definition.
Start of changeLSRPOOLEnd of change
Start of changeRequest statistics on a VSAM LSR pool; RESID identifies the particular pool, in the range 1–255, in fullword binary form.End of change
Start of changeMONITOREnd of change
Start of changeRequest statistics for the monitoring domain. RESID identifies a particular task, in 4-byte packed decimal format, for which performance class statistics are to be returned.End of change
MQCONN
Request statistics for a WebSphere® MQ connection.
Start of changeMVSTCBEnd of change
Start of changeRequest statistics for MVS TCBs. RESID identifies the address of a particular TCB.End of change
PIPELINE
Request statistics for a PIPELINE resource; RESID identifies the particular PIPELINE resource definition.
Start of changePROGAUTOEnd of change
Start of changeRequest statistics on the auto-installed program definitions.End of change
Start of changePROGRAMEnd of change
Start of changeRequest statistics for non-Java programs. RESID identifies a particular program.End of change
Start of changePROGRAMDEFEnd of change
Start of changeRequest statistics on a program definition. RESID identifies a particular programEnd of change
Start of changeRECOVERYEnd of change
Start of changeRequest statistics for the recovery manager domain.End of change
Start of changeSTATSEnd of change
Start of changeRequest statistics on the statistics domain.End of change
Start of changeSTORAGEEnd of change
Start of changeRequest statistics for a storage domain. A RESID specifies statistics to be returned for a particular storage domain subpool. A complete list of the possible subpool names is documented in CICS subpools in the ECDSA.End of change
Start of changeSUBPOOLEnd of change
Start of changeRequest statistics for a storage manager domain subpool. The RESID specifies the particular storage domain subpool.A complete list of the possible subpool names is documented in CICS subpools in the ECDSA.End of change
Start of changeSTREAMNAMEEnd of change
Start of changeRequest statistics for the CICS log manager domain, or if RESID is specified a particular log stream.End of change
Start of changeSYSDUMPCODEEnd of change
Start of changeRequest statistics on system dumps, or if RESID is specified a particular system dump code.End of change
Start of changeTASKSUBPOOLEnd of change
Start of changeRequest statistics for a storage manager task subpools.End of change
Start of changeTCPIPEnd of change
Start of changeRequest statistics for IP sockets.End of change
Start of changeTCPIPSERVICEEnd of change
Start of changeRequest statistics for a TCP/IP service; RESID identifies the particular TCP/IP service.End of change
Start of changeTASKSUBPOOLEnd of change
Start of changeRequest statistics for a storage manager task subpools.End of change
Start of changeTDQUEUEEnd of change
Start of changeRequests statistics for transient data, or is a RESID is specified a particular transient data queue.End of change
Start of changeTRANCLASSEnd of change
Start of changeRequest statistics for a transaction class. RESID identifies the particular TRANCLASS definition.End of change
Start of changeTRANDUMPCODEEnd of change
Start of changeRequest statistics on transaction dumps, or if RESID is specfied a particular transaction dump code.End of change
TRANSACTION
Request statistics on transactions, or if RESID is specified, a particular transaction.
Start of changeTSQUEUEEnd of change
Start of changeRequest statistics on temporary storage.End of change
URIMAP
Request statistics for a URIMAP resource; RESID identifies the particular URIMAP resource definition.
WEBSERVICE
Request statistics for a WEBSERVICE resource; RESID identifies the particular WEBSERVICE resource definition.
XMLTRANSFORM
Request statistics for an XMLTRANSFORM resource; RESID identifies the particular XMLTRANSFORM resource definition.
RESID(data-area)
Specifies the name of a particular resource for which statistics are to be returned. The absence of this keyword means that global statistics are to be extracted. RESID is a character field.

If RESID is specified, resource security check will be performed on the CICS resource. Therefore, the user issuing EXTRACT STATISTICS needs READ access to the resource.

RESIDLEN(data-value)
Specifies the length of the RESID data area. If omitted, the default value is the length given in Table 1.
SET(ptr-ref)
Specifies a pointer reference to be set to the address of the data area containing the returned statistics. The first 2 bytes of the data area contain the length of the data area in halfword binary form.
SUBRESTYPE(cvda)
Requests statistics for a particular resource type depending on the CVDA value supplied. The subrestype parameter is optional; for usage see Table 1. Valid CVDA values are as follows:
CAPTURESPEC
Request statistics for a capture specification.
SUBRESID(data-area)
Specifies the name of the particular resource for which statistics are being extracted. The absence of this keyword means that statistics for the specified RESTYPE are to be extracted. SUBRESID is a character field.

If SUBRESID is specified, resource security check will be performed on the CICS resource. Therefore, the user issuing EXTRACT STATISTICS needs READ access to the resource.

SUBRESIDLEN(data-value)
Specifies the length of the SUBRESID data area. If omitted, the default value is the length given in Table 1.

Conditions

Start of changeAPPNOTFOUNDEnd of change
Start of changeRESP2 values:
1
The command has been issued specifying an application context, but the named application is not found.
End of change
INVREQ
RESP2 values:
5
An invalid RESTYPE has been specified. Valid types are listed in Table 1.
6
A mandatory RESID has not been specified for the requested RESTYPE.
8
An invalid SUBRESTYPE has been specified. Valid types are listed in Table 1.
9
A mandatory SUBRESID has not been specified for the requested SUBRESTYPE.
11
An invalid RESTYPE and SUBRESTYPE combination has been specified. Valid types are listed in Table 1.
IOERR
RESP2 values:
3
The requested statistics area was not functioning. This problem occurs if, for example, statistics control blocks are overwritten.
LENGERR
RESP2 values:
7
An invalid RESIDLEN was supplied for the requested RESID.
10
An invalid SUBRESIDLEN was supplied for the requested SUBRESID.
NOTAUTH
RESP2 values:
100
The user associated with the issuing task is not authorized to use this command.
101
The user associated with the issuing task is not authorized to access this particular resource in the way required by this command.
NOTFND
RESP2 values:
1
The requested resource cannot be found.
2
The type of resource is not defined in the CICS system; for example, if FEPI statistics are requested with POOL or NODE when the FEPI system initialization parameter specifies NO.

Examples

EXEC CICS EXTRACT STATISTICS URIMAP
or
EXEC CICS EXTRACT STATISTICS RESTYPE(1173) 
or
EXEC CICS EXTRACT STATISTICS RESTYPE(DFHVALUE(URIMAP))

CICS provides a sample EXTRACT STATISTICS application, DFH0STAT, that uses the options described in this topic. This set of programs illustrates ways of using the EXTRACT STATISTICS and INQUIRE commands 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 sample statistics program, DFH0STAT for information about installing and operating the DFH0STAT application. The source code for the application is in CICSTS52.CICS.SDFHSAMP.