Migration unload: Exit routine FABHKEYX for distributing unload records

In the migration unload, you can use the IBM®-provided exit routine FABHKEYX to distribute the unload records to multiple unload files according to the root key values.

The multiple unload files enable the Reload and the optional PSSR SORT for two or more HALDB partitions to run in parallel processes, which will reduce the elapsed time for migration.
Note: The exit routine FABHKEYX is used for unloading the HALDB partitions and changing the high key.

To use this exit, you must specify FABHKEYX as an exit routine name on the EXIT control statement in the SYSIN data set and prepare a list of the DD names and the high key values for the unload files in the FABHKEYX data set.

In each unload file, the correct header and trailer records are added.

Restriction: If the root key is compressed, the control statement EXIT FABHKEYX cannot be specified with the DECN control statement.

FABHKEYX data set

The FABHKEYX data set contains 80-byte fixed-length records. The FABHKEYX exit routine reads this data set that contains a list of the DD names and the high key values to distribute the unload records.

The entries of the list must be in the following format and must be listed in ascending order of the high key values.

 0........1.........2.........3.........4.........5.........6...  
 123456789012345678901234567890123456789012345678901234567890...  
 DDname     KeyString 
Position
Description
1-8
Code the output DD name.

This 8-character entry specifies the name of the DD statement for each unload files. The format of each data set must be same as the SYSUT2 DD.

10-
Code the key string.

This variable-length string specifies a high key value. The key values must be enclosed by quotation marks and preceded by the letter C or X: C indicates the character values, and X indicates the hexadecimal values. When the key string is long, you can specify it on multiple lines as follows:

DDNAME01 C'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA  
C'AAAAAAAAAAAA'

Hexadecimal values must be even-length. If the high key is longer than the root key, the later extra will be ignored. If the high key is shorter, the high key value is padded with X'FF's up to the defined root key length.

JCL example for migration unload with FABHKEYX exit

The following is a JCL example to distribute the unload records for migration to HALDB to four unload files by using the FABHKEYX exit routine.

 //    EXEC FABHULU,MBR=FABHURG1,DBD=HDAMDBD  
 //HDAMDD1  DD DSN=TESTDS.HDAMDS1,DISP=SHR  
 //HDAMDD2  DD DSN=TESTDS.HDAMDS2,DISP=SHR  
 //HDAMDD3  DD DSN=TESTDS.HDAMDS3,DISP=SHR  
 //SYSIN    DD *  
 MIGRATE  
 EXIT FABHKEYX  
 //SYSPRINT DD SYSOUT=A  
 //SYSUT2    DD DUMMY  
 //FABHKEYX DD *  
 ULFPART1 C'2999999'  
 ULFPART2 C'5999999'  
 ULFPART3 C'9999999'  
 ULFPART4 X'FF'  
 //ULFPART1   DD DSN=MIGDS1.MIGULDS.ULFPART1, ...  
 //ULFPART2   DD DSN=MIGDS2.MIGULDS.ULFPART2, ...  
 //ULFPART3   DD DSN=MIGDS3.MIGULDS.ULFPART3, ...  
 //ULFPART4   DD DSN=MIGDS3.MIGULDS.ULFPART4, ...
Tips:
  • You can define the SYSUT2 DD as DUMMY to reduce the elapsed time for the I/O operations.
  • It is recommended that you specify X'FF' for the last DD name in the FABHKEYX data set not to throw away segments.