Teradata FastLoad/INMOD Routine Interface | Teradata FastLoad - 17.10 - Teradata FastLoad/INMOD Routine Interface - FastLoad

Teradata® FastLoad Reference

Product
FastLoad
Release Number
17.10
Published
June 2021
Last Update
2021-07-01
Content Type
Programming Reference
Publication ID
B035-2411-061K
Language
English (United States)

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.

Teradata FastLoad-to-INMOD Interface Status Codes 
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 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 workstation-attached client systems.

The following table describes the two status codes used by the INMOD-to-Teradata FastLoad interface.

INMOD-to-Teradata FastLoad Interface Status Codes 
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 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 database.

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 Teradata FastLoad 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.