Unloading a partitioned database with FABHURG1

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

Procedure

  1. Prepare FABHURG1 JCL.

    In FABHURG1 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 SYSIN 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 FABHURG1 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 SYSIN 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=FABHURG1,DBD=USERDBD,DBRC=Y
//RECON1   DD DSN=IMSVS.RECON1,DISP=SHR
//RECON2   DD DSN=IMSVS.RECON2,DISP=SHR
//RECON3   DD DSN=IMSVS.RECON3,DISP=SHR
//HSSROPT  DD *
PARTINFO DEF
/*
//SYSIN    DD *
SEGSTAT PART
/*
//SYSPRINT DD SYSOUT=A
//SYSUT2   DD DSN=IMSDB.HDUNLD,DISP=(,CATLG),UNIT=TAPE,
//            VOL=SER=VOL001

In this example:

  • The unloaded data set is defined by the SYSUT2 DD statement.
  • 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 'PARTINFO DEF' statement produces the HALDB Partition Definition report.
  • The 'SEGSTAT PART' statement produces the partition-wide Segment Statistics report.
Example 2: Unloading a partition
Use the following JCL example to unload a partition of a partitioned database.
//    EXEC FABHULU,MBR=FABHURG1,DBD=USERDBD,DBRC=Y
//SYSIN    DD *
PARTITION PART10
/*
//SYSPRINT DD SYSOUT=A
//SYSUT2   DD DSN=IMSDB.HDUNLD,DISP=(,CATLG),UNIT=TAPE,
//            VOL=SER=VOL001

In this example:

  • The unloaded data set is defined by the SYSUT2 DD statement.
  • The database that is unloaded is specified on the DBD parameter.
  • DBRC=Y is specified so that DBRC is used.
  • The partition to be unloaded is specified by the PARTITION control statement in the SYSIN DD statement. All data sets for the selected partition PART10 are dynamically allocated by HSSR Engine.

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 of a partitioned database.
//    EXEC FABHULU,MBR=FABHURG1,DBD=USERDBD,DBRC=Y
//RECON1   DD DSN=IMSVS.RECON1,DISP=SHR
//RECON2   DD DSN=IMSVS.RECON2,DISP=SHR
//RECON3   DD DSN=IMSVS.RECON3,DISP=SHR
//HSSROPT  DD *
PARTINFO DEF,ACC
/*
//SYSIN    DD *
SEGSTAT PART
PARTITION PART10  5
/*
//SYSPRINT DD SYSOUT=A
//SYSUT2   DD DSN=IMSDB.HDUNLD,DISP=(,CATLG),UNIT=TAPE,
//            VOL=SER=VOL001

In this example:

  • The unloaded data set is defined by the SYSUT2 DD statement.
  • 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 partitions to be unloaded are five consecutive partitions. The first is partition PART10, which is specified on the PARTITION control statement in the SYSIN DD statement. All data sets for the selected partitions are dynamically allocated by HSSR.
  • The 'PARTINFO DEF,ACC' statement produces the HALDB Partition Definition report and the HALDB Partitions Accessed report.
  • The 'SEGSTAT PART' statement produces the partition-wide Segment Statistics report.