Purpose
Terminate is the user-provided function that ends the operating environment of the operator.
Structure
#include <pxoper.h> PXSTC_Code PX_Terminate(PX_OperatorHandle operator, PX_LongInt phase);
where the following is true:
Parameter | Function | Specification |
---|---|---|
operator | input | Operator handle associated with the Terminate function. The operator parameter is a handle that identifies the operator that the Terminate function is bound to. You can use this handle to terminate any of the Teradata PT service functions described in Operator Interface Functions. |
phase | input | Current processing phase number. |
Return Codes
The following Terminate function status codes are defined by the Teradata PT operator interface.
Status Code | Signifies |
---|---|
PXSTC_EndMethod | Successful termination of the operator. |
PXSTC_NextPhase | Proceed with the next processing phase. |
PXSTC_SamePhase | Continue with the current processing phase. |
Define additional Terminate function status codes as required to support your operator.
Usage Notes
Consider the following when defining the Terminate function.
Topic | Usage Notes |
---|---|
Status | If the function status is PXSTC_EndMethod, the processing environment was successfully terminated by this function. See also Initiate function. |