Teradata FastLoad exchanges information with an INMOD routine by passing an address that points to a three-value structure: status code, length, and body.
Status Code
Status code is the 32-bit signed binary value that carries information in both directions.
The following table explains the six status codes used by the Teradata FastLoad-to-INMOD interface.
Value | Description |
---|---|
0 | Teradata FastLoad is calling for the first time. Teradata FastLoad expects the INMOD routine to return a data record. At this point, the INMOD routine should perform its initialization tasks before sending a data record to Teradata FastLoad.
|
1 | Teradata FastLoad is calling, not for the first time. Teradata FastLoad expects the INMOD routine to return a data record. |
2 | The client system has been restarted. The INMOD routine should reposition to the last checkpoint. Teradata FastLoad is not expecting the INMOD routine to return a record. This is a one-time call, and Teradata FastLoad does not issue a subsequent call with a status code value of zero.
|
3 | A checkpoint has been written. The INMOD routine should remember the checkpoint position. Teradata FastLoad does not expect the INMOD routine to return a record. |
4 | The Teradata Database has failed. The INMOD routine should reposition to the last checkpoint. Teradata FastLoad is not expecting the INMOD routine to return a record. This is a one-time call, and Teradata FastLoad does not issue a subsequent call with a status code value of zero.
|
5 | The Teradata FastLoad job has ended. The INMOD routine should perform any required cleanup tasks. This condition only applies to network-attached client systems.
|
The following table describes the two status codes used by the INMOD-to-Teradata FastLoad interface.
Status Code | Description |
---|---|
0 | a record is being returned as the Body value |
any nonzero value | the INMOD routine is at an end-of-file condition |
Length
Length is a 32-bit signed binary value that the INMOD routine uses to specify the length, in bytes, of the data record.
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.
The maximum record length depends on the release/version level of the Teradata Database. Teradata FastLoad neither checks nor enforces record length restrictions on data provided by the INMOD routine. The record length, therefore, must not exceed the capability of the Teradata Database.