STATISTICS command with FILE subcommand

This section describes the STATISTICS command with the FILE subcommand.

Usage

  • Use the FILE subcommand to format unreduced Db2® data and store it in sequential data sets suitable for use by the Db2 load utility. The records can be placed in Db2 tables, and you can produce reports by using a reporting facility such as IBM® Query Management Facility (QMF).
  • You can also use the FILE data sets to generate CSV (comma-separated value) input-data. This CSV data can then be transferred to workstations and imported into spreadsheets to improve Db2 performance analysis using graphical representations or pivot tables. For more information refer to Reporting User's Guide.

Usage notes

  • The data is stored in delta records in a sequential data set.

Syntax of the FILE subcommand


1  FILE?  
2.1 %FROM/TO block
2.2.1! NOEXCEPTION
2.2.1 EXCEPTION
2.1  DDNAME (
2.2.1 ddname
2.2.1! STFILDD1
2.1 )
2.1 %INCLUDE/EXCLUDE block
2.1  DSETSTAT
2.1  LOCSTAT
2.1  APPSTAT
2.1  USERSTAT
2.1  PROFSTAT

Subcommand options

The syntax diagram shows the options that are available with this subcommand. See Subcommand options for comprehensive descriptions of these options. The following list gives additional or specific descriptions of selected options, where appropriate.

FROM/TO
Limits the range of delta records included in the data set by date and time.

Combinations of FROM date and time, and TO date and time can be specified. Delta records are included from the first with an ending timestamp greater than or equal to the FROM date and time, to the last with an ending timestamp less than the TO date and time.

Any FROM/TO dates and times specified in GLOBAL can restrict the range of delta records included in the file data set. GLOBAL FROM/TO filters the raw Db2 statistics records used to make up the delta records. Therefore, all records with begin or end times outside the GLOBAL dates and times are discarded. If the date and time is not specified in GLOBAL, all records in the input data are available.

You can specify a time adjustment for a Db2 location using the TIMEZONE option of the GLOBAL command. The time adjustment is applied to the record timestamp before FROM/TO processing.

If you are reducing data, the FROM/TO times specified in REDUCE can affect the data available for filing.

Refer to GLOBAL command for more information.

For details on how to use the FROM/TO option, see FROM/TO subcommand options.

EXCEPTION
NOEXCEPTION
Specifies EXCEPTION to include only those file entries containing fields with values outside user-specified limits. Otherwise, all records are included.

If you use this subcommand option, your JCL must contain a valid DD definition for the ddname EXCPTDD. For more information about required ddnames, see EXCPTDD statement.

DDNAME
Specifies the ddname where the file data set is written. The default ddname is STFILDD1.
INCLUDE/EXCLUDE
Includes or excludes data associated with specific OMEGAMON AI for Db2 identifiers.

For details, see INCLUDE and EXCLUDE subcommand options, which lists other identifiers allowed with this command and subcommand combination, and OMEGAMON AI for Db2 identifiers.

DSETSTAT
Includes buffer pool data set statistics.
LOCSTAT
Include remote location statistics. IFCID 365 externalization is controlled by system parameter STATIME and can range from 1 to 60 minutes. Interval metrics for remote location statistics can be obtained from Statistics TRACE or FILE data created with LOCSTAT.
Note: Input must contain IFCIDs 1, 2, and 365 for the remote location statistics to be generated.
APPSTAT
Generates information from IFCID 411 which records detailed statistics about the application that connects to a Db2 subsystem. The interval at which the IFCID 0411 records are produced is controlled by the STATIME_MAIN subsystem parameter.
USERSTAT
Generates information from IFCID 412 which records detailed statistics about the client userid that connects to a Db2 subsystem. The interval at which the IFCID 0411 records are produced is controlled by the STATIME_MAIN subsystem parameter.
PROFSTAT
Include Profile Monitoring statistics from IFCID 402. The interval at which the IFCID 0402 records are produced is controlled by the STATIME subsystem parameter. For a specific profile, IFCID 402 tracks any profile warning or exception that occurred during a statistics interval.

Example using FILE with DSETSTAT, and DDNAME

This example:
  • Includes buffer tool data set statistics.
  • Writes the data to the STFILDD1 dataset.
.
.
FILE
	DSETSTAT
	DDNAME(STFILDD1)
.
.