15.00 - Teradata MultiLoad/INMOD Routine Interface - MultiLoad

Teradata MultiLoad Reference

prodname
MultiLoad
vrm_release
15.00
category
Programming Reference
featnum
B035-2409-034K

Teradata MultiLoad/INMOD Routine Interface

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.

Note: Be sure to compile the INMOD and notify exit routines in 32-bit mode so 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. Table 23 defines the eight status codes used by the Teradata MultiLoad-to-INMOD interface.

 

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

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

The INMOD routine repositions to the last checkpoint.

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

Note: If Teradata Database restarts before the first checkpoint, Teradata MultiLoad sends entry code 5 for cleanup, and then it sends entry code 0 to re-initialize.

5

Teradata Database failed.

The INMOD routine repositions to the last checkpoint.

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

Note: If Teradata Database restarts before the first checkpoint, Teradata MultiLoad sends entry code 5 for cleanup, and then it sends entry code 0 to re-initialize.

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.

6

The Teradata MultiLoad job ended.

The INMOD routine performs any required cleanup tasks.

7

The INMOD initializes and prepares to receive records.

8

The next record is available for the INMOD.

Table 24 explains the two status codes used by the INMOD-to-Teradata MultiLoad interface.

 

Table 24: 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 Teradata for Windows
  • 62 K or 63,488 bytes for Teradata Database 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
  • Notice:

    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.