FastExport exchanges information with an INMOD routine by using the conventional parameter register to point to a parameter list of two 32‑bit addresses.
The first 32‑bit address points to a three‑value INMOD interface parameter list consisting of status code, length, and body values. The second 32‑bit address of the FastExport/INMOD interface points to a data structure containing sequence number and parameter list fields.
The following sections describe both sets of address pointers.
Status Code
The status code pointer is a 32‑bit signed binary value that carries information in both directions. Table 18 explains the eight status code values of the FastExport‑to‑INMOD interface.
Value |
Description |
0 |
FastExport is calling for the first time and expects the INMOD routine to return a record. At this point, the INMOD routine should perform its initialization tasks before sending a data record to FastExport. |
1 |
FastExport is calling, not for the first time, and expects the INMOD routine to return a record. |
2 |
The client system has been restarted and the INMOD routine should reposition to the last checkpoint. FastExport is not expecting the INMOD routine to return a record. This is a one‑time call, and FastExport does not issue a subsequent call with a status code value of zero. Note: If the client system restarts before the first checkpoint, entry code 1 is sent to reinitialize the job. |
3 |
A checkpoint has been written and the INMOD routine should save the checkpoint position. FastExport does not expect the INMOD routine to return a record. |
4 |
Teradata Database has failed and the INMOD routine should reposition to the last checkpoint. FastLoad is not expecting the INMOD routine to return a record. This is a one‑time call, and FastExport does not issue a subsequent call with a status code value of zero. If the database restarts before the first checkpoint, entry code 2 is sent for cleanup, and entry code 1 is sent to re‑initialize the job. |
5 |
The FastExport job has ended and the INMOD routine should perform any required cleanup tasks. Note: This condition applies only to network‑attached client systems. |
6 |
The INMOD routine should initialize and prepare to receive a record from FastExport. |
7 |
The INMOD routine should receive a record from FastExport. |
Table 19 reflects the INMOD‑to‑FastExport interface status code values (two).
Status Code |
Indication |
0 |
The INMOD routine: |
Any nonzero value |
The INMOD routine has encountered: |
Length
Length is a 32‑bit signed binary value that specifies the length, in bytes, of the data record. The maximum record length is 62K, or 63,488 bytes.
The INMOD routine can use a Length value of zero to indicate an end‑of‑file condition.
Body
Body is the area where the INMOD routine places the data record.
Sequence Number
The sequence number field contains a 4‑byte integer, which is the integer record counter portion of the source sequence number.
Parameter List
The parameter list field consists of:
Notice:
To prevent data corruption, INMOD routines that cannot comply with these protocols should terminate if they encounter a restart code 2, 3, or 4. To support proper FastExport restart operations, INMOD routines must save and restore checkpoint information as described here. If the INMOD saves checkpoint information in some other manner, a subsequent restart/recovery operation could result in data loss or corruption.