15.00 - Teradata FastLoad/INMOD Routine Interface - FastLoad

Teradata FastLoad Reference

prodname
FastLoad
vrm_release
15.00
category
Programming Reference
featnum
B035-2411-034K

Teradata FastLoad/INMOD Routine Interface

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.

Table 16 explains the six status codes used by the Teradata FastLoad‑to‑INMOD interface.

 

Table 16: 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.

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

Note: This is a onetime 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.

Note: This is a onetime 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.

Note: This condition only applies to networkattached client systems.

Table 17 describes the two status codes used by the INMOD‑to‑Teradata FastLoad interface.

 

Table 17: INMODtoTeradata 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 endoffile 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.

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