Unloading a partitioned database with FABHFSU

To unload a partitioned database by using FABHFSU, you must modify the FABHURG1 JCL that is used for nonpartitioned database.

Procedure

  1. Prepare FABHFSU JCL.

    In standard mode FABHFSU JCL that is used for a nonpartitioned database, make the following modifications to process a HALDB:

    • Specify that DBRC will be used.
    • Specify the DD statements for RECON data sets or make sure that RECON data sets will be allocated dynamically.
    • Ensure that DD statements for database data sets are not specified.
    • If you want to unload a particular partition or a sequence of partitions, code a PARTITION control statement in the SYSIN data set (explained in the next step).
  2. Code the PARTITION control statement in the CARDIN data set.

    To process a partition or a sequence of partitions, you must specify the partition by coding the PARTITION control statement. For details of the control statement, see PARTITION control statement.

    Note: To unload an entire database, you do not need to code a PARTITION control statement in your FABHFSU JCL.
  3. Optional: If you want to print partition-wide statistics reports, code additional control statements.

    The following control statements can be used to print partition-wide statistics reports:

    • SEGSTAT control statement in the CARDIN data set
    • CALLSTAT control statement in the HSSROPT data set
    • PARTINFO control statement in the HSSROPT data set

Examples

Example 1: Unloading an entire database
Use the following JCL example to unload an entire database.
//       EXEC FABHULU,MBR=FABHFSU,DBD=SKILLINV,DBRC=Y
//RECON1   DD DSN=IMSVS.RECON1,DISP=SHR
//RECON2   DD DSN=IMSVS.RECON2,DISP=SHR
//RECON3   DD DSN=IMSVS.RECON3,DISP=SHR
//CARDIN   DD *
DBDSKILLINV
PSB*       OUTPUT    UL
END
/*
//HSSROPT  DD *
PARTINFO DEF
/*
//PRNTOUT  DD SYSOUT=A
//OUTPUT   DD DSN=IMSDB.UNLOADDS,DISP=(,KEEP),UNIT=TAPE

In this example:

  • The database that is unloaded is specified on the DBD parameter.
  • DBRC=Y is specified so that DBRC is used.
  • The DD statements for RECON data sets are specified.
  • All partition data sets are dynamically allocated by HSSR Engine.
  • The DBD statement specifies the DBD name.
  • The PSB statement shows that the unloaded data set is specified by the OUTPUT DD statement and that the output records are written in the UL format.
  • The 'PARTINFO DEF' statement produces the HALDB Partition Definition report.
Example 2: Unloading a partition
Use the following JCL example to unload a partition of a partitioned database.
//       EXEC FABHULU,MBR=FABHFSU,DBD=SKILLINV,DBRC=Y
//CARDIN   DD *
DBDSKILLINV
PSB*       OUTPUT    UL
PARTITION SKINVP1
SEGSTAT PART
END
/*
//PRNTOUT  DD SYSOUT=A
//OUTPUT   DD DSN=IMSDB.UNLOADDS,DISP=(,KEEP),UNIT=TAPE

In this example:

  • The database that is unloaded is specified on the DBD parameter.
  • DBRC=Y is specified so that DBRC is used.
  • The DBD statement specifies the DBD name.
  • The PSB statement shows that the unloaded data set is specified by the OUTPUT DD statement and that the output records are written in the UL format.
  • The partition to be unloaded is specified by the PARTITION control statement in the CARDIN DD statement. All data sets for the selected partition SKINVP1 are dynamically allocated by HSSR.
  • The 'SEGSTAT PART' statement produces the partition-wide Segment Statistics report.

In this example, it is assumed that the RECON data sets are dynamically allocated.

Example 3: Unloading a sequence of partitions
Use the following JCL example to unload a sequence of partitions from a partitioned database.
//       EXEC FABHULU,MBR=FABHFSU,DBD=SKILLINV,DBRC=Y
//RECON1   DD DSN=IMSVS.RECON1,DISP=SHR
//RECON2   DD DSN=IMSVS.RECON2,DISP=SHR
//RECON3   DD DSN=IMSVS.RECON3,DISP=SHR
//CARDIN   DD *
DBDSKILLINV
PSB*       OUTPUT    UL
PARTITION SKINVP1 3
SEGSTAT PART
END
/*
//HSSROPT  DD *
PARTINFO DEF,ACC
/*
//PRNTOUT  DD SYSOUT=A
//OUTPUT   DD DSN=IMSDB.UNLOADDS,DISP=(,KEEP),UNIT=TAPE

In this example:

  • The database that is unloaded is specified on the DBD parameter.
  • DBRC=Y is specified so that DBRC is used.
  • The DD statements for RECON data sets are specified.
  • The DBD statement specifies the DBD name.
  • The PSB statement shows that the unloaded data set is specified by the OUTPUT DD statement and that the output records are written in the UL format.
  • The partitions to be unloaded are three consecutive partitions. The first is the partition SKINVP1, which is specified on the PARTITION control statement in the CARDIN DD statement. All data sets for the selected partitions are dynamically allocated by HSSR Engine.
  • The 'SEGSTAT PART' statement produces the partition-wide Segment Statistics report.
  • The 'PARTINFO DEF,ACC' statement in HSSROPT DD produces the HALDB Partition Definition report and the HALDB Partitions Accessed report.