You must use a combination of an IRD and FBE to migrate a dataset to more than one DB2® table. Your IRD must take account of the initial data migration, when IRDFUNCT=L. The IRD parameters IRDGPTR, IRDTYPE, IRDB2DLN, and IRD2DAT are only used when IRDFUNCT=L.
To understand the use of these parameters, the following sections describe their use in various scenarios.
The sample exit MULTIRD details the FBE and IRD for migrating a file with multiple record types. For each VSAM record, there are two DB2 records created during initial migration; a record for the primary DB2 table and a record for the appropriate record type DB2 table.
Parameter Name | Parameter Value |
---|---|
IRDRPTGR | A single record is written for each secondary table so the value is 1. |
IRDTYPE | The appropriate 2-byte record type indicator. |
IRDB2DLN | The length of the DB2 record excluding IRDTYPE. |
IRDB2DAT | The area in your exit where the DB2 record is built. |
Parameter Name | Parameter Value |
---|---|
IRDRPTGR | The number of records to be written for the secondary table. If you have an OCCURS DEPENDING ON clause then this parameter value may vary. |
IRDTYPE | The appropriate 2-byte record type indicator. |
IRDB2DLN | The length of each DB2 record excluding IRDTYPE. |
IRDB2DAT | The area in your exit where the DB2 records are built. |