15.00 - The Teradata TPump/INMOD Routine Interface - Parallel Data Pump

Teradata Parallel Data Pump Reference

prodname
Parallel Data Pump
vrm_release
15.00
category
Programming Reference
featnum
B035-3021-034K

The Teradata TPump/INMOD Routine Interface

Teradata TPump 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 structure consisting of status code, length, and body. The second 32‑bit address points to a data structure containing a sequence number and a parameter list.

Status Code

Status Code is a 32‑bit signed binary value that carries information in both directions.

Table 35 lists Teradata TPump‑to‑INMOD interface uses eight status codes, as defined in the table.

 

Table 35: Teradata TPumptoINMOD Status Codes 

Value

Description

0

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

1

Teradata TPump is calling, not for the first time and expects the INMOD routine to return a record.

2

The client system has been restarted, the INMOD routine should reposition to the last checkpoint, and Teradata TPump is not expecting the INMOD routine to return a data record.

Note: If the client system restarts before the first checkpoint, Teradata TPump sends entry code 0 to reinitialize. Repositioning information, provided by the INMOD after a code 3, is read from the restart log table and returned in the buffer normally used for the data record.

3

A checkpoint has been written, the INMOD routine should remember the checkpoint position, and Teradata TPump does not expect the INMOD routine to return a data record.

In the buffer normally used to return data, the INMOD should return any information (up to 100 bytes) needed to reposition to this checkpoint. The utility saves this information in the restart log table.

4

Teradata Database has failed, the INMOD routine should reposition to the last checkpoint, and Teradata TPump is not expecting the INMOD routine to return a data record.

Note: If the database restarts before the first checkpoint, Teradata TPump sends entry code 5 for cleanup, and then it sends entry code 0 to reinitialize.

Teradata TPump reads the repositioning information, provided by the INMOD after a code 3, from the restart log table and returned to the INMOD in the buffer normally used for the data record.

5

The Teradata TPump job has ended and the INMOD routine should perform any required cleanup tasks.

6

The INMOD should initialize and prepare to receive records.

7

The next record is available for the INMOD.

Table 36 explains the two status codes used by the INMOD‑to‑Teradata TPump interface.

 

Table 36: INMODtoTeradata TPump Interface Status Codes 

Value

Description

0

A record is being returned as the body value for a read call (code 1).

For calls other than read, a value of 0 indicates successful completion.

Any nonzero value

The INMOD routine is at an endoffile condition for a read call (code 1). For calls other than read, a nonzero value indicates a processing error that terminates Teradata TPump.

Length

Length is the 32‑bit 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. Maximum record length for Teradata Database is 62K or 63,488 bytes.

Sequence Number

Sequence number is a 4‑byte integer record counter portion of the source sequence number.

Parameter List

The parameter list in the second 32‑bit address consists of the following:

  • VARCHAR specification
  • Two‑byte length specification, m
  • The m‑byte parms string, as parsed and presented by Teradata TPump
  • 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 TPump 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.