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. The following table 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. 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 | The 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. This condition applies only to workstation-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. |
The following table 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
- VARCHAR specification
- Two-byte length specification, m
- The m-byte parms string, as parsed and presented by FastExport