Teradata FastLoad/INMOD Routine Interface - FastLoad

Teradata® FastLoad Reference

Product
FastLoad
Release Number
16.20
Published
October 2018
Language
English (United States)
Last Update
2019-02-14
dita:mapPath
ybx1527114222321.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2411
lifecycle
previous
Product Category
Teradata Tools and Utilities

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

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

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.