Teradata MultiLoad/INMOD Routine Interface - MultiLoad

Teradata® MultiLoad Reference - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
MultiLoad
Release Number
20.00
Published
October 2023
Language
English (United States)
Last Update
2024-03-18
dita:mapPath
lji1691576359330.ditamap
dita:ditavalPath
kju1619195148891.ditaval
dita:id
sga1478609868891
Product Category
Teradata Tools and Utilities

Teradata MultiLoad exchanges information with an INMOD routine by using the conventional parameter register to point to a parameter list of two 32-bit addresses.

The INMOD and Notify Exit routines must be compiled in 64-bit mode on all platforms except for z/OS so that they are compatible with Teradata MultiLoad.

The first 32-bit address points to a three-value structure consisting of StatusCode, Length, and Body. The second 32-bit address points to a data structure containing a sequence number and a parameter list.

StatusCode

StatusCode is a 32-bit signed binary value that carries information in both directions. The following table defines the eight status codes used by the Teradata MultiLoad-to-INMOD interface.

Teradata MultiLoad-to-INMOD Status Codes 
Value Description
0 Teradata MultiLoad is calling for the first time.

Teradata MultiLoad expects the INMOD routine to return a record.

At this point the INMOD routine performs its initialization tasks before sending a data record to Teradata MultiLoad.

1 Teradata MultiLoad is calling, not for the first time.

Teradata MultiLoad expects the INMOD routine to return a record.

2 The client system has been restarted.

The INMOD routine repositions to the last checkpoint.

Teradata MultiLoad is not expecting the INMOD routine to return a data record.

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.

If the client system restarts before the first checkpoint, Teradata MultiLoad sends entry code 0 to re-initialize.
3 A checkpoint has been written.

The INMOD routine remembers the checkpoint position.

Teradata MultiLoad does not expect the INMOD routine to return a data record.

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

4 Teradata MultiLoad 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 MultiLoad job ended.

The INMOD routine performs any required cleanup tasks.

6 The INMOD initializes and prepares to receive records.
7 The next record is available for the INMOD.

The following table explains the two status codes used by the INMOD-to-Teradata MultiLoad interface.

INMOD-to-Teradata MultiLoad Interface Status Codes 
Value Description
0 A record is 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 end-of-file condition for a read call (code 1).

For calls other than read, a nonzero value indicates a processing error that terminates Teradata MultiLoad.

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 represents the area where the INMOD routine places the data record. The maximum record length is:
  • 31 K or 31,744 bytes for Vantage for Windows
  • 62 K or 63,488 bytes for Vantage for a UNIX OS

Sequence Number

Sequence number is a 4-byte integer, the 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
  • A 2-byte length specification, m
  • The m-byte parms string, as parsed and presented by Teradata MultiLoad
To prevent data corruption, INMOD routines that cannot comply with these protocols terminate if they encounter a restart code 2, 3, or 4. To support proper Teradata MultiLoad 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.