Using the extract statistics reporting function

About this task

The existing statistics utility program record selection capabilities, such as, applid, date and time apply automatically to extract reports as well as to any other statistics reports that may be created at the same time. However, the COLLECTION TYPE control parameter of DFHSTUP is ignored in an EXTRACT report.

Important: You must use the JCL statements in this topic with the full DFHSTUP program job in the topic Job to run the DFHSTUP program.

To use the extract reporting function:

Procedure

  1. Specify the EXTRACT control statement to control the output from DFHSTUP.
    The EXTRACT control statement takes all the statistics data from the input SMF data set and passes it to a user program for processing. The EXTRACT control statement has the following syntax:
    EXTRACT USERPROGRAM=progname
    where USERPROGRAM is the name of the user-written program that is to process the data. You must supply a USERPROGRAM value.

    Specifying the EXTRACT control statement changes the default DFHSTUP report settings. If you specify only the EXTRACT control statement, only the extract exit is driven; other DFHSTUP reports are suppressed. If EXTRACT is specified, other statistics report control statements, such as SUMMARY, must also be specified to ensure that the appropriate reports are produced.

  2. Use the STXRINPT DD control statement to specify the event types to be reported.
    The possible event types are:
    [EXCEPTION] [WARNING] [INFORMATION]
    
    Exception is the default. You can abbreviate these parameters to EXC, WARN and INFO.
  3. If you want to print all types of statistics reports, including a summary and an event report, you could specify the following:
    //xxxxxxxx JOB (job accounting)
    //stepname EXEC PGM=DFHSTUP,REGION=0M
    //STEPLIB  DD DSN=....
    //         DD DSN=....
    //         DD DSN=PP.CEE.SCEERUN,DISP=SHR
    //DFHSTATS DD DSN=...
    //DFHSTWRK DD ....
    //SYSPRINT DD SYSOUT=x
    //STXRRPT  DD SYSOUT=x
    //STXRINPT DD *
    INFO
    /*
    //SYSIN DD *
    COLLECTION TYPE=ALL
    SUMMARY
    EXTRACT USERPROGRAM=DFH0STXR
    /*
    //
    
  4. To produce an event-type report using the CICS supplied sample exit program, you could specify the following:
    //xxxxxxxx JOB (job accounting)
    //stepname EXEC PGM=DFHSTUP,REGION=0M
    //STEPLIB  DD DSN=....
    //         DD DSN=....
    //         DD DSN=PP.CEE.SCEERUN,DISP=SHR
    //DFHSTATS DD DSN=...
    //DFHSTWRK DD ....
    //SYSPRINT DD SYSOUT=x
    //STXRRPT  DD SYSOUT=x
    //STXRINPT DD *
    INFO                          <- Optional input
    /*
    //SYSIN DD *
    EXTRACT USERPROGRAM=DFH0STXR
    /*
    //
    
  5. Assemble (or compile) and link edit DFHSTUP user programs as batch programs, not as CICS applications.
  6. Link-edit control statements appropriate to the language in which they are written.
    When you link-edit the programs, you need to specify the following link-edit control statements:
    • An ENTRY statement that defines the entry name as DFHEXTRA
    • An INCLUDE statement for a CICS-supplied stub that must be included in your user program
    • A CHANGE statement to change the dummy CSECT name in the CICS-supplied stub from EXITEP to the name of you user program.
    These requirements are illustrated in the following sample job stream.
    //DFHxxxxx JOB (),CLASS=A,MSGCLASS=A,NOTIFY=userid
    //*
    //* Compile job step here
    //*
    //LINK     EXEC PGM=IEWL,PARM='XREF,LIST,LET'
    //SYSLIB   DD DSN=PP.CEE.SCEELKED,DISP=SHR
    //CICSLIB  DD DSN=CICSTS52.CICS.SDFHLOAD,DISP=SHR
    //OBJLIB   DD DSN=object.module.library,DISP=SHR
    //SYSLMOD  DD DSN=user.library,DISP=SHR
    //SYSUT1   DD UNIT=SYSDA,SPACE=(1024,(100,10)) 
    //SYSPRINT DD SYSOUT=x
    //SYSLIN   DD *
     ENTRY   DFHEXTRA
     CHANGE  EXITEP(program name)
     INCLUDE CICSLIB(DFHSTXLE)
     INCLUDE OBJLIB(obj-prog)
     MODE AMODE(31),RMODE(24)
     NAME    progname(R) 
    /*
    //
    Note:
    1. The entry name, DFHEXTRA, is the entry name in the CICS-supplied stub, DFHSTXLE.
    2. The CICS-supplied stub, DFHSTXLE, is generated with a link to the user program using a dummy CSECT name (EXITEP).
    3. Use the link edit CHANGE statement to change the CSECT name from EXITEP to the name specified as the program ID or CSECT name in the user program.
    4. Include DFHSTXLE in any Language Environment®-conforming user program that you write for use with the DFHSTUP EXTRACT command. DFHSTXLE is the interface stub between DFHSTOT, a module in DFHSTUP, and the Language Environment user program.
    5. obj-prog is the name of the object program.
    6. progname is the name for the load module; this is the name that you specify on the USERPROGRAM parameter of the EXTRACT command.
    7. You must link edit user programs AMODE(31) and RMODE(24).