STATISTICS command

This section provides an overview of the STATISTICS command.

Usage

Use the STATISTICS command to generate Statistics reports, traces, and file data sets. You can also use it to reduce, save, and restore data.

Usage notes

  • This command can be used once in a job step.
  • However, it can be used in the same job step with commands of the other report sets.
  • You can filter records with the GLOBAL command first. This can minimize your report output and reduce processing time. See GLOBAL command for more information.

Syntax of the STATISTICS command

Read syntax diagramSkip visual syntax diagram STATISTICS REPORT subcommand1REDUCE subcommand2SAVE subcommand3RESTORE subcommand4TRACE subcommand5FILE subcommand6
Notes:
  • 1 You can specify REPORT up to 5 times.
  • 2 You can specify REDUCE only once. If specified, you must also specify REPORT or SAVE at least once.
  • 3 You can specify SAVE only once.
  • 4 You can specify RESTORE only once.
  • 5 You can specify TRACE up to 5 times.
  • 6 You can specify FILE only once.

Subcommands

The subcommands are described in detail, together with their various options, in the following sections.

Sample JCL for requesting Statistics functions

Figure 1 is a sample of the JCL required to produce statistic reports and traces. See DD statements for descriptions of the DD statements.
Figure 1. Sample JCL for requesting Statistics functions
 //       PEMAIN EXEC PGM=FPECMAIN
 //* FOLLOWING ARE SYSTEM DDNAMES
 //STEPLIB  DD  DSN=FPE.FPELIB.RKANMOD,DISP=SHR
 //DPMPARMS DD  DSN=MYID.FPELIB.DPMPARMS,DISP=SHR
 //INPUTDD  DD  DSN=MYID.FPELIB.DPMIN,DISP=SHR
 //DPMLOG   DD  SYSOUT=*
 //SYSOUT   DD  SYSOUT=*
 //JOBSUMDD DD  SYSOUT=*
 //EXCPTDD  DD  DSN=MYID.EXCEPT.THRESH,DISP=OLD
 //EXTRCDD1 DD  SYSOUT=*
 //EXFILDD1 DD  DSN=MYID.EXCEPT.LOGFILE,DISP=OLD
 //DPMOUTDD DD  DSN=MYID.FPELIB.DPMOUT.DATA,DISP=OLD
 //JSSRSDD  DD  DSN=MYID.FPELIB.JSSRS.DATA,DISP=OLD
 //SYSUDUMP DD  DUMMY
 //* FOLLOWING ARE REPORT SET DDNAMES
 //STRPTDD  DD  SYSOUT=*
 //STTRCDD1 DD  SYSOUT=*
 //STSAVDD  DD  DSN=MYID.FPELIB.STSAV.DATA,DISP=OLD
 //STRSTDD  DD  DSN=MYID.FPELIB.STRST.DATA,DISP=SHR
 //STFILDD1 DD  DSN=MYID.FPELIB.STFIL.DATA,DISP=SHR
 //STWORK   DD  DSN=MYID.FPELIB.STA.WORKDD,DISP=OLD
 //* FOLLOWING IS THE COMMAND STREAM
 //SYSIN   DD  *
 
STATISTICS
   REDUCE
   TRACE
   REPORT
   RESTORE
   SAVE
   FILE
 
EXEC

The OMEGAMON for Db2 PE command language shown in this section is not appropriate in all circumstances. You must modify it to meet your requirements.

Most of the DD statements with a SYSOUT destination do not have to be specified because they are dynamically allocated by OMEGAMON for Db2 PE. See the individual DD statement descriptions for more information.
Note:
  1. There is a performance advantage in omitting DPMOUTDD from your JCL. For more information, see DPMOUTDD statement.
  2. The OMEGAMON for Db2 PE command stream is only processed if EXEC is included as the last command. Otherwise, OMEGAMON for Db2 PE only checks the syntax.