Status Code is a 32-bit signed binary value that carries information in both directions.
The following table lists Teradata TPump-to-INMOD interface uses eight status codes, as defined in the table.
|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.
If the client system restarts before the first checkpoint, Teradata TPump sends entry code 0 to re-initialize. 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||The 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.
|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.|
The following table explains the two status codes used by the INMOD-to-Teradata TPump interface.
|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 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 TPump.|
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 is the area where the INMOD routine places the data record. Maximum record length for the database is 62K or 63,488 bytes.
Sequence number is a 4-byte integer record counter portion of the source sequence number.
- VARCHAR specification
- Two-byte length specification, m
- The m-byte parms string, as parsed and presented by Teradata TPump