FPA Change JCL examples for monitoring and tuning DEDBs

Use these JCL examples to monitor and tune DEDBs by using the FPA Change function.

JCL template for running the FPA Change function

The following figure shows a JCL template for running the FPA Change function to reorganize multiple areas that are registered with DBRC while renaming the input area data sets (ADSs).

In this example:
  • RECON data sets are allocated dynamically by using the DFSMDA members in the IMSDALIB DD data set.
  • The input ADSs are specified by the IDSNMASK='HPFP.&AREA.ADS1' parameter. These data sets are allocated dynamically.
  • The input ADSs are renamed by using a mask before processing the CHANGE command.
  • The output ADSs are defined by the ALLOCATE subcommand before processing the CHANGE command.
  • The output ADSs to be reorganized are dynamically allocated. The allocation information (DD statement name and DS name of the ADSs) is obtained from DBRC.
  • After the reorganization, fast scan of database integrity verification is performed to analyze the areas. The PTRCHKLVL keyword is not specified; therefore, the default value (PTRCHKLVL=QUICK) is applied.
Figure 1. JCL template for FPA Change
//HFP      EXEC PGM=HFPMAIN0
//STEPLIB  DD DISP=SHR,DSN=HPFP.SHFPLMD0
//         DD DISP=SHR,DSN=IMSVS.SDFSRESL
//         DD DISP=SHR,DSN=IMSVS.PGMLIB
//IMSACB   DD DISP=SHR,DSN=IMSVS.ACBLIB
//IMSDALIB DD DISP=SHR,DSN=IMSVS.MDALIB
//HFPSYSIN DD *
 GLOBAL
   DBRC=YES
 CHANGE
   DBD=DEDBJN22,
   IAREA=(DB22AR0,DB22AR1),
   IDSNMASK='HPFP.&AREA.ADS1',
   OAREA=(DB22AR0,DB22AR1)
  IRENAME
   IAREA=(DB22AR0,DB22AR1),
   DSNAME='HPFP.OLD.&AREA.ADS1'
  ALLOCATE
   OAREA=(DB22AR0,DB22AR1),
   SPACE=(CYL,500),
   VOLSER=HFPVOL 
/*

Example 1: Storing statistics in the HISTORY data set

The following figure shows example JCL for storing the statistical information of a reorganized area that is registered in DBRC into the HISTORY data set.

Prerequisite: If you are using the HISTORY data set for the first time, initialize the permanent data sets by following the procedures in Preprocess for the Analyze process: Initializing permanent data set. Also see History file records layout for information about the layout of the History file records.
In this example:
  • The HFPAHST DD statement specifies the HISTORY data set.
    Tip: Instead of using the HFPAHST DD statement, you can specify a different DD statement that is specified by the HISTORYDD= keyword parameter.
  • PTRCHKLVL=FULL for the CHANGE command specifies that the integrity verification process runs in FULL mode.
  • The REPORT subcommand specifies that the statistics are stored in the HISTORY data set.
Figure 2. FPA Change example 1: Storing statistics in the HISTORY data set
//HFP      EXEC PGM=HFPMAIN0
//STEPLIB  DD DISP=SHR,DSN=HPFP.SHFPLMD0
//         DD DISP=SHR,DSN=IMSVS.SDFSRESL
//         DD DISP=SHR,DSN=IMSVS.PGMLIB
//IMSACB   DD DISP=SHR,DSN=IMSVS.ACBLIB
//IMSDALIB DD DISP=SHR,DSN=IMSVS.MDALIB
//HFPAHST  DD DISP=(MOD,KEEP,KEEP),DSN=HPFP.HISTORY
//HFPSYSIN DD *
 GLOBAL
   DBRC=YES
 CHANGE
   DBD=DEDBJN22,
   IAREA=(DB22AR0,DB22AR1),
   IDSNMASK='HPFP.&AREA.ADS1',
   OAREA=(DB22AR0,DB22AR1),
   PTRCHKLVL=FULL
  IRENAME
   IAREA=(DB22AR0,DB22AR1),
   DSNAME='HPFP.OLD.&AREA.ADS1'
  ALLOCATE
   OAREA=(DB22AR0,DB22AR1),
   SPACE=(CYL,500),
   VOLSER=HFPVOL 
  REPORT
/*

Example 2: Storing statistics in the HISTORY2 data set

The following figure shows example JCL for storing the statistical information of a UOW group of a reorganized area into the HISTORY2 data set.

Prerequisite: If you are using the HISTORY2 data set for the first time, initialize the permanent data sets by following the procedures in Preprocess for the Analyze process: Initializing permanent data set. Also see History2 file records layout for information about the layout of the History2 file records.
In this example:
  • The HFPAHST2 DD statement specifies the HISTORY2 data set.
  • The HFPAUOWC DD statement specifies the group of UOWs for the area.
  • PTRCHKLVL=FULL for the CHANGE command specifies that the integrity verification process runs in FULL mode.
  • The REPORT subcommand specifies that the statistics are stored in the HISTORY2 data set.
Figure 3. FPA Change example 2: Storing statistics in the HISTORY2 data set
//HFP      EXEC PGM=HFPMAIN0
//STEPLIB  DD DISP=SHR,DSN=HPFP.SHFPLMD0
//         DD DISP=SHR,DSN=IMSVS.SDFSRESL
//         DD DISP=SHR,DSN=IMSVS.PGMLIB
//IMSACB   DD DISP=SHR,DSN=IMSVS.ACBLIB
//IMSDALIB DD DISP=SHR,DSN=IMSVS.MDALIB
//HFPAHST2 DD DISP=(MOD,KEEP,KEEP),DSN=HPFP.HISTORY2
//HFPAUOWC DD DISP=SHR,DSN=HPFP.UOWCTL
//HFPSYSIN DD *
 GLOBAL
   DBRC=YES
 CHANGE
   DBD=DEDBJN22,
   IAREA=(DB22AR0,DB22AR1),
   IDSNMASK='HPFP.&AREA.ADS1',
   OAREA=(DB22AR0,DB22AR1),
   PTRCHKLVL=FULL
  IRENAME
   IAREA=(DB22AR0,DB22AR1),
   DSNAME='HPFP.OLD.&AREA.ADS1'
  ALLOCATE
   OAREA=(DB22AR0,DB22AR1),
   SPACE=(CYL,500),
   VOLSER=HFPVOLL
  REPORT
/*

Example 3: Storing statistics in the Sensor Data repository

The following figure shows example JCL for storing the statistical information of an entire reorganized area that is registered in DBRC into the Sensor Data repository.

Prerequisite: To run this JCL, an IMS Tools Knowledge Base server and its repositories must be configured.
In this example:
  • The IMS Tools Base library (ITBVS.SHKTLOAD) is concatenated to the STEPLIB DD.
  • ITKBSRVR= for the GLOBAL command specifies the IMS Tools KB server XCF group.
  • PTRCHKLVL=FULL for the CHANGE command specifies that the integrity verification process runs in FULL mode.
  • SENSOR=YES for the CHANGE command specifies that the statistics are stored in the Sensor Data repository.
  • SENSOR_DBREC=YES for the CHANGE command specifies that the statistics that are related to database records and root segment distribution are collected.
Figure 4. FPA Change example 3: Storing statistics in the Sensor Data repository
//HFP      EXEC PGM=HFPMAIN0
//STEPLIB  DD DISP=SHR,DSN=HPFP.SHFPLMD0
//         DD DISP=SHR,DSN=IMSVS.SDFSRESL
//         DD DISP=SHR,DSN=ITBVS.SHKTLOAD
//         DD DISP=SHR,DSN=IMSVS.PGMLIB
//IMSACB   DD DISP=SHR,DSN=IMSVS.ACBLIB
//IMSDALIB DD DISP=SHR,DSN=IMSVS.MDALIB
//HFPSYSIN DD *
 GLOBAL
   DBRC=YES,
   ITKBSRVR=FPQSRVFP
 CHANGE
   DBD=DEDBJN22,
   IAREA=(DB22AR0,DB22AR1),
   IDSNMASK='HPFP.&AREA.ADS1',
   OAREA=(DB22AR0,DB22AR1),
   PTRCHKLVL=FULL,
   SENSOR=YES,
   SENSOR_DBREC=YES
  IRENAME
   IAREA=(DB22AR0,DB22AR1), 
   DSNAME='HPFP.OLD.&AREA.ADS1'
  ALLOCATE
   OAREA=(DB22AR0,DB22AR1),
   SPACE=(CYL,500),
   VOLSER=HFPVOL
/*

Example 4: Specifying FPA threshold values

The following figure shows example JCL for specifying the threshold values of FPA.

In this example:
  • PTRCHKLVL=FULL for the CHANGE command specifies that the integrity verification process runs in FULL mode.
  • The REPORT subcommand specifies that the Process Summary of Analysis report is generated.
  • The THRESHOLD subcommand enables the threshold settings.
  • The keywords and their parameters for the THRESHOLD subcommand specify the threshold values.
Figure 5. FPA Change example 4: Specifying FPA threshold values
//HFP      EXEC PGM=HFPMAIN0
//STEPLIB  DD DISP=SHR,DSN=HPFP.SHFPLMD0
//         DD DISP=SHR,DSN=IMSVS.SDFSRESL
//         DD DISP=SHR,DSN=IMSVS.PGMLIB
//IMSACB   DD DISP=SHR,DSN=IMSVS.ACBLIB
//IMSDALIB DD DISP=SHR,DSN=IMSVS.MDALIB
//HFPSYSIN DD *
 GLOBAL
   DBRC=YES
 CHANGE
   DBD=DEDBJN22,
   IAREA=(DB22AR0,DB22AR1),
   IDSNMASK='HPFP.&AREA.ADS1',
   OAREA=(DB22AR0,DB22AR1),
   PTRCHKLVL=FULL
  IRENAME
   IAREA=(DB22AR0,DB22AR1),
   DSNAME='HPFP.OLD.&AREA.ADS1'
  ALLOCATE
   OAREA=(DB22AR0,DB22AR1),
   SPACE=(CYL,500),
   VOLSER=HFPVOL
  REPORT
  THRESHOLD
   RAAFS_PCT=30,
   RECIO_MAX=6 
/*

See THRESHOLD subcommand for the keywords that you can specify on the THRESHOLD subcommand.

Example 5: Generating free space analysis reports

The following figure shows example JCL for generating the reports that are required for free space analysis.

In this example, the REPORT subcommand specifies that the Freespace Analysis report is generated.

Figure 6. FPA Change example 5: Generating reports for free space analysis
//HFP      EXEC PGM=HFPMAIN0
//STEPLIB  DD DISP=SHR,DSN=HPFP.SHFPLMD0
//         DD DISP=SHR,DSN=IMSVS.SDFSRESL
//         DD DISP=SHR,DSN=IMSVS.PGMLIB
//IMSACB   DD DISP=SHR,DSN=IMSVS.ACBLIB
//IMSDALIB DD DISP=SHR,DSN=IMSVS.MDALIB
//HFPSYSIN DD *
 GLOBAL
   DBRC=YES
 CHANGE
   DBD=DEDBJN22,
   IAREA=(DB22AR0,DB22AR1),
   IDSNMASK='HPFP.&AREA.ADS1',
   OAREA=(DB22AR0,DB22AR1)
  IRENAME
   IAREA=(DB22AR0,DB22AR1),
   DSNAME='HPFP.OLD.&AREA.ADS1'
  ALLOCATE
   OAREA=(DB22AR0,DB22AR1),
   SPACE=(CYL,500),
   VOLSER=HFPVOL
  REPORT
/*

Example 6: Generating reports to obtain database records and randomizing information

The following figure shows example JCL for generating reports that contain information about database records and randomizing.

In this example:
  • PTRCHKLVL=FULL for the CHANGE command specifies that the integrity verification process runs in FULL mode.
  • The REPORT subcommand specifies that the DEDB Area Analysis report is generated.
Figure 7. FPA Change example 6: Generating reports to obtain database records and randomizing information
//HFP      EXEC PGM=HFPMAIN0
//STEPLIB  DD DISP=SHR,DSN=HPFP.SHFPLMD0
//         DD DISP=SHR,DSN=IMSVS.SDFSRESL
//         DD DISP=SHR,DSN=IMSVS.PGMLIB
//IMSACB   DD DISP=SHR,DSN=IMSVS.ACBLIB
//IMSDALIB DD DISP=SHR,DSN=IMSVS.MDALIB
//HFPSYSIN DD *
 GLOBAL
   DBRC=YES
 CHANGE
   DBD=DEDBJN22,
   IAREA=(DB22AR0,DB22AR1),
   IDSNMASK='HPFP.&AREA.ADS1',
   OAREA=(DB22AR0,DB22AR1),
   PTRCHKLVL=FULL
  IRENAME
   IAREA=(DB22AR0,DB22AR1),
   DSNAME='HPFP.OLD.&AREA.ADS1'
  ALLOCATE
   OAREA=(DB22AR0,DB22AR1),
   SPACE=(CYL,500),
   VOLSER=HFPVOL
  REPORT
/*

Example 7: Generating reports to obtain large database records information

The following figure shows example JCL for generating the reports that contain information about the large database records.

In this example:
  • PTRCHKLVL=FULL for the CHANGE command specifies that the integrity verification process runs in FULL mode.
  • The REPORT subcommand, LARGEREC_REPORT=YES, and LARGEREC_COUNT=(10,20) specify that the Largest Database Records report and the Consolidated Largest Database Records report are generated.
Figure 8. FPA Change example 7: Generating reports to obtain large database records information
//HFP      EXEC PGM=HFPMAIN0
//STEPLIB  DD DISP=SHR,DSN=HPFP.SHFPLMD0
//         DD DISP=SHR,DSN=IMSVS.SDFSRESL
//         DD DISP=SHR,DSN=IMSVS.PGMLIB
//IMSACB   DD DISP=SHR,DSN=IMSVS.ACBLIB
//IMSDALIB DD DISP=SHR,DSN=IMSVS.MDALIB
//HFPSYSIN DD *
 GLOBAL
   DBRC=YES
 CHANGE
   DBD=DEDBJN22,
   IAREA=(DB22AR0,DB22AR1),
   IDSNMASK='HPFP.&AREA.ADS1',
   OAREA=(DB22AR0,DB22AR1),
   PTRCHKLVL=FULL
  IRENAME
   IAREA=(DB22AR0,DB22AR1),
   DSNAME='HPFP.OLD.&AREA.ADS1'
  ALLOCATE
   OAREA=(DB22AR0,DB22AR1),
   SPACE=(CYL,500),
   VOLSER=HFPVOL
  REPORT 
   LARGEREC_REPORT=YES,
   LARGEREC_COUNT=(10,20)
/*

Example 8: Generating reports for all UOWs

The following figure shows example JCL for generating the reports for all UOWs.

In this example:
  • PTRCHKLVL=FULL for the CHANGE command specifies that the integrity verification process runs in FULL mode.
    Tip: Use this option when you want to obtain information about database record length.
  • The REPORT subcommand specifies that the UOW reports are generated.
Figure 9. FPA Change example 8: Generating reports for all UOWs
//HFP      EXEC PGM=HFPMAIN0
//STEPLIB  DD DISP=SHR,DSN=HPFP.SHFPLMD0
//         DD DISP=SHR,DSN=IMSVS.SDFSRESL
//         DD DISP=SHR,DSN=IMSVS.PGMLIB
//IMSACB   DD DISP=SHR,DSN=IMSVS.ACBLIB
//IMSDALIB DD DISP=SHR,DSN=IMSVS.MDALIB
//HFPSYSIN DD *
 GLOBAL
   DBRC=YES
 CHANGE
   DBD=DEDBJN22,
   IAREA=(DB22AR0,DB22AR1),
   IDSNMASK='HPFP.&AREA.ADS1',
   OAREA=(DB22AR0,DB22AR1),
   PTRCHKLVL=FULL
  IRENAME
   IAREA=(DB22AR0,DB22AR1),
   DSNAME='HPFP.OLD.&AREA.ADS1'
  ALLOCATE
   OAREA=(DB22AR0,DB22AR1),
   SPACE=(CYL,500),
   VOLSER=HFPVOL
  REPORT
/*

Example 9: Generating reports for UOWs in which exceptions were detected

The following figure shows example JCL for generating the reports only for the UOWs in which exceptions were detected.

In this example:
  • PTRCHKLVL=FULL for the CHANGE command specifies that the integrity verification process runs in FULL mode.
    Tip: Use this option when you want to obtain information about database record length.
  • The REPORT subcommand specifies that the UOW Exception reports are generated.
  • The HFPAPARM DD statement specifies the threshold values for generating the UOW Exception reports.
Figure 10. FPA Change example 9: Generating reports for UOWs in which exceptions were detected
//HFP      EXEC PGM=HFPMAIN0
//STEPLIB  DD DISP=SHR,DSN=HPFP.SHFPLMD0
//         DD DISP=SHR,DSN=IMSVS.SDFSRESL
//         DD DISP=SHR,DSN=IMSVS.PGMLIB
//IMSACB   DD DISP=SHR,DSN=IMSVS.ACBLIB
//IMSDALIB DD DISP=SHR,DSN=IMSVS.MDALIB
//HFPAPARM DD *
    RDOVFFS=40 UDOVFFS=35 RBASEFS=40
/*
//HFPSYSIN DD *
 GLOBAL
   DBRC=YES
 CHANGE
   DBD=DEDBJN22,
   IAREA=(DB22AR0,DB22AR1),
   IDSNMASK='HPFP.&AREA.ADS1',
   OAREA=(DB22AR0,DB22AR1),
   PTRCHKLVL=FULL
  IRENAME
   IAREA=(DB22AR0,DB22AR1),
   DSNAME='HPFP.OLD.&AREA.ADS1'
  ALLOCATE
   OAREA=(DB22AR0,DB22AR1), 
   SPACE=(CYL,500),
   VOLSER=HFPVOL
  REPORT
/*