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 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.
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.
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
- 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
- VARCHAR specification
- A 2-byte length specification, m
- The m-byte parms string, as parsed and presented by Teradata MultiLoad